Skip to content

Fix format specifiers for long err in numa bind warning message#1321

Open
StanFromIreland wants to merge 1 commit into
microsoft:mainfrom
StanFromIreland:spec
Open

Fix format specifiers for long err in numa bind warning message#1321
StanFromIreland wants to merge 1 commit into
microsoft:mainfrom
StanFromIreland:spec

Conversation

@StanFromIreland

Copy link
Copy Markdown

This was reported by CodeQL in CPython (we bundle a copy).

There are two more alterts in _mi_arena_free:

_mi_error_message(EINVAL, "trying to free from an invalid arena: %p, size %zu, memid: 0x%zx\n", p, size, memid);

_mi_error_message(EINVAL, "trying to free from an invalid arena block: %p, size %zu, memid: 0x%zx\n", p, size, memid);

The 24-byte mi_memid_t struct memid is passed to a %zx (size_t) format specifier which is UB under CodeQL's cpp/wrong-type-format-argument rule. I'm not familiar with mimalloc to know how to fix these :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant