Calls to gcc_jit_context_get_builtin_function that accessed builtins in sanitizer.def and after (or failed to match any builtin) led to a crash accessing a NULL builtin name. The entries with the NULL name came from these lines in sanitizer.def: /* This has to come before all the sanitizer builtins. */ DEF_BUILTIN_STUB(BEGIN_SANITIZER_BUILTINS, (const char *)0) [...snip...] /* This has to come after all the sanitizer builtins. */ DEF_BUILTIN_STUB(END_SANITIZER_BUILTINS, (const char *)0) This patch updates jit-builtins.c to cope with such entries, fixing the crash. gcc/jit/ChangeLog: PR jit/82174 * jit-builtins.c (matches_builtin): Ignore entries with a NULL name. gcc/testsuite/ChangeLog: PR jit/82174 * jit.dg/test-error-gcc_jit_context_get_builtin_function-unknown-builtin.c: New test case. From-SVN: r252769
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
docs | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.jit | Loading commit data... | |
Make-lang.in | Loading commit data... | |
TODO.rst | Loading commit data... | |
config-lang.in | Loading commit data... | |
dummy-frontend.c | Loading commit data... | |
jit-builtins.c | Loading commit data... | |
jit-builtins.h | Loading commit data... | |
jit-common.h | Loading commit data... | |
jit-logging.c | Loading commit data... | |
jit-logging.h | Loading commit data... | |
jit-playback.c | Loading commit data... | |
jit-playback.h | Loading commit data... | |
jit-recording.c | Loading commit data... | |
jit-recording.h | Loading commit data... | |
jit-result.c | Loading commit data... | |
jit-result.h | Loading commit data... | |
jit-spec.c | Loading commit data... | |
jit-tempdir.c | Loading commit data... | |
jit-tempdir.h | Loading commit data... | |
libgccjit++.h | Loading commit data... | |
libgccjit.c | Loading commit data... | |
libgccjit.h | Loading commit data... | |
libgccjit.map | Loading commit data... | |
notes.txt | Loading commit data... |