-
Notifications
You must be signed in to change notification settings - Fork 394
Open
Description
Hi,
I found a sanitizer-detected implicit conversion issue in nasm 3.01rc7, and it is also present in the current master branch.
UBSan reports:
/root/build/nasm-nasm-3.01rc7/asm/preproc.c:8238:26: runtime error: implicit conversion from type 'int' of value -57 (32-bit, signed) to type 'unsigned int' changed the value to 4294967239 (32-bit, unsigned)
The code at this location is:
flags &= ~(SPARM_GREEDY|SPARM_VARADIC|SPARM_OPTIONAL);
This seems to come from applying ~ to the flag mask expression, which produces a negative signed intermediate value before the &= operation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels