Skip to content

Don't return null pointer when asking for the type of a declared global#57447

Merged
Keno merged 1 commit intomasterfrom
kf/57446
Feb 18, 2025
Merged

Don't return null pointer when asking for the type of a declared global#57447
Keno merged 1 commit intomasterfrom
kf/57446

Conversation

@Keno
Copy link
Copy Markdown
Member

@Keno Keno commented Feb 17, 2025

The _DECLARED partition kind used to be considered guard, but we now consider it equivalent to an Any-typed _GLOBAL (but with weaker redefinition properties). That said, its ->restriction is NULL, so add it to the list of bindings that should return nothing here (and thus Any from the bulitin) to fix #57446.

The `_DECLARED` partition kind used to be considered `guard`, but we now
consider it equivalent to an Any-typed `_GLOBAL` (but with weaker redefinition
properties). That said, its `->restriction` is NULL, so add it to the list
of bindings that should return `nothing` here (and thus `Any` from the bulitin)
to fix #57446.
@oscardssmith oscardssmith added compiler:codegen Generation of LLVM IR and native code bugfix This change fixes an existing bug backport 1.12 Change should be backported to release-1.12 labels Feb 17, 2025
@Keno Keno merged commit 0163991 into master Feb 18, 2025
@Keno Keno deleted the kf/57446 branch February 18, 2025 01:03
@KristofferC KristofferC mentioned this pull request Feb 21, 2025
24 tasks
KristofferC pushed a commit that referenced this pull request Feb 21, 2025
…al (#57447)

The `_DECLARED` partition kind used to be considered `guard`, but we now
consider it equivalent to an Any-typed `_GLOBAL` (but with weaker
redefinition properties). That said, its `->restriction` is NULL, so add
it to the list of bindings that should return `nothing` here (and thus
`Any` from the bulitin) to fix #57446.

(cherry picked from commit 0163991)
KristofferC added a commit that referenced this pull request Feb 26, 2025
Backported PRs:
- [x] #57302 <!-- Add explicit imports for types and fix bugs -->
- [x] #57420 <!-- Compiler: Fix check for IRShow definedness -->
- [x] #57419 <!-- generated: Switch resolution module back to what it
was before -->
- [x] #57421 <!-- bpart: Skip implicit import reval if using'd export
set is unchanged -->
- [x] #57425 <!-- Prohibit binding replacement in closed modules during
precompile -->
- [x] #57426 <!-- Prohibit `import`ing or `using` Main during
incremental compilation -->
- [x] #57433 <!-- bpart: Track whether any binding replacement has
happened in image modules -->
- [x] #57445 <!-- Run all `--sysimage-native-code=no` cmdlineargs tests
single-threaded -->
- [x] #57386 <!-- Only strip invariant.load from special pointers -->
- [x] #57453 <!-- Revert "Make emitted egal code more loopy (#54121)"
-->
- [x] #57389 <!-- Change memory indexing to use the type as index
instead of i8 -->
- [x] #57447 <!-- Don't return null pointer when asking for the type of
a declared global -->
- [x] #57467 <!-- using/import: ensure world update after each
observable operation -->
- [x] #57471 <!-- staticdata: Don't use `newm` pointer after it has been
invalidated -->
- [x] #57416 <!-- lowering: Don't mutate lambda in `linearize` -->
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug compiler:codegen Generation of LLVM IR and native code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assignment to an undef global instead segfaults

3 participants