Skip to content

remove some __gshared from elfobj.d#22994

Merged
WalterBright merged 1 commit into
dlang:masterfrom
WalterBright:elfobj_gshared
Apr 20, 2026
Merged

remove some __gshared from elfobj.d#22994
WalterBright merged 1 commit into
dlang:masterfrom
WalterBright:elfobj_gshared

Conversation

@WalterBright
Copy link
Copy Markdown
Member

Can't believe I haven't noticed before that snprintf should use the n < length rather than n <= length check.

@WalterBright WalterBright added Review:Easy Review Severity:Refactoring No semantic changes to code Compiler:Backend glue code, optimizer, code generation labels Apr 20, 2026
@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#22994"

@dkorpel
Copy link
Copy Markdown
Contributor

dkorpel commented Apr 20, 2026

Why the asserts that snprintf doesn't go past its given length, are we expecting snprintf to have a buggy implementation sometimes?

@WalterBright
Copy link
Copy Markdown
Member Author

The assert() is for when the supplied buffer isn't big enough.

@WalterBright WalterBright merged commit 8ffd142 into dlang:master Apr 20, 2026
40 of 42 checks passed
@WalterBright WalterBright deleted the elfobj_gshared branch April 20, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler:Backend glue code, optimizer, code generation Review:Easy Review Severity:Refactoring No semantic changes to code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants