nasm/nasmlib
H. Peter Anvin (Intel) f21b2ba8f3 BR 3392687: clang miscompiles offsetin() for uninitialized pointer
The actual pointer value in offsetin() cancels out, but clang still
miscompiles offsetin() for an uninitialized pointer, considering the
value to be completely undefined. Initialize pointer being passed to
offsetin() to make clang happy; both the gcc and clang optimizers
discover later in the code that the initialization is unused and
removes it from the code.

Although technically undefined behavior, this is in my opinion a
severe quality of implementation bug in clang, and I will file a bug
report accordingly.

Reported-by: Jasper Lievisse Adriaanse <r+nasm@jasper.la>
Reported-by: David Bohman <debohman@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-06-30 09:54:01 -07:00
..
alloc.c errors: be more robust in handling unexpected fatal errors 2019-08-28 18:32:46 -07:00
alloc.h errors: be more robust in handling unexpected fatal errors 2019-08-28 18:32:46 -07:00
asprintf.c preproc: fix parsing of single-line macro arguments, cleanups 2019-08-09 02:34:21 -07:00
badenum.c
bsi.c Move <string.h> inclusion to compiler.h 2018-12-26 06:32:37 -08:00
crc64.c preprocessor: major cleanups; inline text into Token 2019-09-23 16:40:03 -07:00
errfile.c Remove #includes already provided by "compiler.h" 2018-12-27 12:45:44 -08:00
file.c disam: explicitly change stdin to binary mode 2020-04-22 00:09:58 +00:00
file.h disam: explicitly change stdin to binary mode 2020-04-22 00:09:58 +00:00
filename.c
hashtbl.c hashtbl.c: don't call nasm_free() for a null pointer 2020-06-08 19:01:05 -07:00
ilog2.c
md5c.c Move <string.h> inclusion to compiler.h 2018-12-26 06:32:37 -08:00
mmap.c
nctype.c Restore the ability to have ? in identifiers, except ? itself 2018-12-14 00:57:05 -08:00
path.c
perfhash.c
perfhash.pl hash generators: rename UNUSED to UNUSED_HASH_ENTRY 2020-06-30 09:17:41 -07:00
raa.c preproc: massive cleanup of smacro expansion 2019-04-25 18:00:32 -07:00
rbtree.c
readnum.c Replace nasm_error(ERR_WARNING|...) with nasm_warn() 2019-08-06 19:18:36 -07:00
realpath.c Remove #includes already provided by "compiler.h" 2018-12-27 12:45:44 -08:00
rlimit.c BR 3392667: more reasonable limit for expression descent 2020-06-01 13:21:05 -07:00
saa.c SAA: allow seeking beyond the end of the array 2019-02-25 21:02:18 -08:00
string.c
strlist.c BR 3392687: clang miscompiles offsetin() for uninitialized pointer 2020-06-30 09:54:01 -07:00
ver.c nasmlib/ver.[ch]: add "compiler.h" 2018-12-26 06:37:25 -08:00
zerobuf.c