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 Add generic perfect string hashes, use for directives 2017-04-03 00:27:07 -07:00
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 Eliminate filename length restrictions, remote ofmt->filename() 2017-12-20 13:38:20 -08:00
hashtbl.c hashtbl.c: don't call nasm_free() for a null pointer 2020-06-08 19:01:05 -07:00
ilog2.c ilog2(): inline functions if practical 2017-09-27 13:34:42 -07:00
md5c.c Move <string.h> inclusion to compiler.h 2018-12-26 06:32:37 -08:00
mmap.c nasmlib/file: move memory-mapping functions out of file.c 2017-02-23 18:39:00 -08:00
nctype.c Restore the ability to have ? in identifiers, except ? itself 2018-12-14 00:57:05 -08:00
path.c path: nasm_catfile -- Fix incorrect return of filename only 2018-10-19 00:55:54 +03:00
perfhash.c Add generic perfect string hashes, use for directives 2017-04-03 00:27:07 -07:00
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 Reorganize the source code into subdirectories 2016-05-25 12:06:29 -07:00
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 ctype: create our own ctype table 2018-11-28 14:55:58 -08:00
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 nasmlib: break up nasmlib.c into logical components 2016-05-25 05:43:49 -07:00