Bug 2211507

Summary: dynamic_cast() is failing
Product: Red Hat Enterprise Linux 8 Reporter: Paulo Andrade <pandrade>
Component: gcc-toolset-11-gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 8.7CC: ahajkova, fweimer, jakub, ohudlick, sipoyare
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-05 16:08:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paulo Andrade 2023-05-31 20:12:26 UTC
This bug was initially created as a copy of Bug #2211506

I am copying this bug because: 



User is experiencing the issue in upstream bug report
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99074
[gcc 8 and above is crashing with dynamic_cast<>() on null pointer with optimization level -O1 and above]
and would like a backport for gcc-toolset-9-gcc-9.2* as it is being used
for their product.

While it is agreed it is UB, previous source code relied on this working.

Comment 1 Marek Polacek 2023-06-05 16:08:37 UTC
While GCC Toolset 11 is still supported, the fix is for libstdc++.so.6, which is not included in the toolset.
The fix will happen to be included in the next update of the system GCC in RHEL 9 (but currently I have no
plans to rebuild the system gcc in RHEL8).

Comment 2 Marek Polacek 2023-06-13 21:36:38 UTC
*** Bug 2211509 has been marked as a duplicate of this bug. ***