[all-commits] [llvm/llvm-project] ab43ab: [OpenMP] Fix use of uninitialized Dl_info when dla...
Mark Zhuang via All-commits
all-commits at lists.llvm.org
Tue Apr 28 14:05:56 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab43ab6158a19f60048cdbc77fe645ae61de0bae
https://github.com/llvm/llvm-project/commit/ab43ab6158a19f60048cdbc77fe645ae61de0bae
Author: Mark Zhuang <mark.zhuang at spacemit.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)
Changed paths:
M openmp/runtime/src/ompd-specific.cpp
Log Message:
-----------
[OpenMP] Fix use of uninitialized Dl_info when dladdr fails in ompd_init (#193643)
When dladdr() fails, dl_info is left uninitialized. The code printed the
error but then fell through to unconditionally call
strrchr(dl_info.dli_fname, '/'), accessing an uninitialized pointer --
typically NULL on the stack -- causing a SIGSEGV.
Fix by turning the second 'if' into 'else if', so the path-extraction
block is only reached when dladdr() succeeded and dl_info is valid.
Assisted-by: Claude Sonnet 4.6
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list