https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106703
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-08-21
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Crash happens here due to filename being NULL:
642 sarif_builder::make_artifact_location_object (const char *filename)
643 {
644 json::object *artifact_loc_obj = new json::object ();
645
646 /* "uri" property (SARIF v2.1.0 section 3.4.3). */
647 artifact_loc_obj->set ("uri", new json::string (filename));
due to:
#4 0x0000000001f26ba5 in sarif_builder::make_artifact_location_object
(this=this@entry=0x2c0c8b0, loc=loc@entry=2147483651) at
../../src/gcc/diagnostic-format-sarif.cc:630
630 return make_artifact_location_object (LOCATION_FILE (loc));
where:
(gdb) p /x loc
$3 = 0x80000003
(gdb) p line_table->location_adhoc_data_map.data[3]
$4 = {locus = 0, src_range = {m_start = 0, m_finish = 0}, data =
0x7fffea1ee420}
i.e. UNKNOWN_LOCATION wrapped with inlining information.