Skip to content

[LLD][ELF] Add missing initialization of Symbol used member.#202578

Merged
dyung merged 1 commit into
llvm:release/22.xfrom
nga888:fix-uninitialised-symbol-used
Jun 10, 2026
Merged

[LLD][ELF] Add missing initialization of Symbol used member.#202578
dyung merged 1 commit into
llvm:release/22.xfrom
nga888:fix-uninitialised-symbol-used

Conversation

@nga888

@nga888 nga888 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

On the "main" branch, Symbol no longer has the used member which was moved in PR #190117 (commit 6a87416). Therefore, when the cherry pick from PR #198129 (commit 905a88b) was merged to the "release/22.x" branch, the initialization of used was lost.

@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-lld

Author: Andrew Ng (nga888)

Changes

On the "main" branch, Symbol no longer has the used member. Therefore, when PR #198129 (commit 905a88b) was cherry picked to the "release/22.x" branch, the initialization of used was lost.


Full diff: https://github.com/llvm/llvm-project/pull/202578.diff

1 Files Affected:

  • (modified) lld/ELF/Symbols.h (+5-5)
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 23994ccea1ef0..26d28825558c9 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -243,11 +243,11 @@ class Symbol {
          uint8_t stOther, uint8_t type)
       : file(file), nameData(name.data()), nameSize(name.size()), type(type),
         binding(binding), stOther(stOther), symbolKind(k), isPreemptible(false),
-        isUsedInRegularObj(false), isExported(false), ltoCanOmit(false),
-        traced(false), hasVersionSuffix(false), isInIplt(false),
-        gotInIgot(false), folded(false), archSpecificBit(false),
-        scriptDefined(false), dsoDefined(false), dsoProtected(false),
-        versionScriptAssigned(false), thunkAccessed(false),
+        isUsedInRegularObj(false), used(false), isExported(false),
+        ltoCanOmit(false), traced(false), hasVersionSuffix(false),
+        isInIplt(false), gotInIgot(false), folded(false),
+        archSpecificBit(false), scriptDefined(false), dsoDefined(false),
+        dsoProtected(false), versionScriptAssigned(false), thunkAccessed(false),
         inDynamicList(false), referenced(false), referencedAfterWrap(false) {}
 
   void overwrite(Symbol &sym, Kind k) const {

@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-lld-elf

Author: Andrew Ng (nga888)

Changes

On the "main" branch, Symbol no longer has the used member. Therefore, when PR #198129 (commit 905a88b) was cherry picked to the "release/22.x" branch, the initialization of used was lost.


Full diff: https://github.com/llvm/llvm-project/pull/202578.diff

1 Files Affected:

  • (modified) lld/ELF/Symbols.h (+5-5)
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 23994ccea1ef0..26d28825558c9 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -243,11 +243,11 @@ class Symbol {
          uint8_t stOther, uint8_t type)
       : file(file), nameData(name.data()), nameSize(name.size()), type(type),
         binding(binding), stOther(stOther), symbolKind(k), isPreemptible(false),
-        isUsedInRegularObj(false), isExported(false), ltoCanOmit(false),
-        traced(false), hasVersionSuffix(false), isInIplt(false),
-        gotInIgot(false), folded(false), archSpecificBit(false),
-        scriptDefined(false), dsoDefined(false), dsoProtected(false),
-        versionScriptAssigned(false), thunkAccessed(false),
+        isUsedInRegularObj(false), used(false), isExported(false),
+        ltoCanOmit(false), traced(false), hasVersionSuffix(false),
+        isInIplt(false), gotInIgot(false), folded(false),
+        archSpecificBit(false), scriptDefined(false), dsoDefined(false),
+        dsoProtected(false), versionScriptAssigned(false), thunkAccessed(false),
         inDynamicList(false), referenced(false), referencedAfterWrap(false) {}
 
   void overwrite(Symbol &sym, Kind k) const {

@nga888 nga888 added the regression:22 Regression in 22 release label Jun 9, 2026
@nickdesaulniers

Copy link
Copy Markdown
Member

Can you reference the commit that removed used member from Symbol in the commit message+PR description?

@nga888
nga888 force-pushed the fix-uninitialised-symbol-used branch from e1751aa to 804ab24 Compare June 9, 2026 16:21
@nga888

nga888 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Can you reference the commit that removed used member from Symbol in the commit message+PR description?

I've updated the commit message and PR description as requested.

@nickdesaulniers nickdesaulniers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch

@github-project-automation github-project-automation Bot moved this from Needs Triage to Needs Merge in LLVM Release Status Jun 9, 2026
On the "main" branch, Symbol no longer has the `used` member which was
moved in PR llvm#190117 (commit 6a87416). Therefore, when the cherry pick
from PR llvm#198129 (commit 905a88b) was merged to the "release/22.x"
branch, the initialization of `used` was lost.
@dyung
dyung force-pushed the fix-uninitialised-symbol-used branch from 804ab24 to 070e505 Compare June 10, 2026 17:50
@dyung
dyung merged commit 070e505 into llvm:release/22.x Jun 10, 2026
4 of 10 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Merge to Done in LLVM Release Status Jun 10, 2026
@nga888
nga888 deleted the fix-uninitialised-symbol-used branch July 14, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lld:ELF lld regression:22 Regression in 22 release

Projects

Development

Successfully merging this pull request may close these issues.

4 participants