Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 872368

Summary: dev-util/rocminfo-5.1.3 segfaults with LTO enabled for dev-libs/rocr-runtime
Product: Gentoo Linux Reporter: Adrien Dessemond <admnd>
Component: Current packagesAssignee: Craig Andrews <candrews>
Status: RESOLVED FIXED    
Severity: normal CC: eschwartz93, xgreenlandforwyy
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/RadeonOpenCompute/rocminfo/issues/57
https://github.com/ROCm/ROCR-Runtime/issues/182
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    

Description Adrien Dessemond 2022-09-22 12:29:48 UTC
# rocminfo 
ROCk module is loaded
Segmentation fault

Issue does not show up in an environment without LTO. The root cause lies in dev-libs/rocr-runtime where a singleton that handles various init values referenced by rocminfo is created. With LTO, GCC (11.3.1) detects deadcode and removes it thus having a NULL pointer giving a segfault.

See attached reference to the upstream report.
Comment 1 Adrien Dessemond 2023-09-10 16:34:49 UTC
Issue still valid with dev-util/rocminfo-5.5.1 + dev-libs/rocr-runtime-5.5.1
Comment 2 Eli Schwartz 2024-03-12 06:05:59 UTC
It makes sense that the issue would still be valid, since you closed your upstream bug report with the message:

"Closed, not a bug in itself."
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-12 06:07:03 UTC
Ineed, rebuilding without LTO making it work doesn't mean much.
Comment 4 Eli Schwartz 2024-03-12 06:08:10 UTC
Due to bug 856091 I marked rocr-runtime as not LTO-safe, so you cannot compile it with LTO anymore.

Tracked upstream as https://github.com/ROCm/ROCR-Runtime/issues/182

I'm assuming this solves your issue, then.