ziglang/zig
261
5.9k
Fork
You've already forked zig
764

Asserts InternPool keys have unique representations #35914

Merged
andrewrk merged 2 commits from masonremaley/intern-pool-unique-key-reprs into master 2026年06月25日 20:38:16 +02:00 AGit

Asserts InternPool keys have unique representations, resolving an inline TODO. I also added asserts that these types are extern compatible so as to guarantee stability across compilations.

While I was at it I also made a small improvement to hasUniqueRepresentation WRT unions. Not necessary for this PR could be separated.

SpirvType was failing both of these assertions. I resolved this by making it extern, and adding explicitly zeroed padding.

I didn't yet add test coverage that type equality works on reified SPIRV types, as zirReifySpirvType returns unique values for each type regardless of the hash. See #35915 for more info.

Asserts InternPool keys have unique representations, resolving an inline TODO. I also added asserts that these types are extern compatible so as to guarantee stability across compilations. While I was at it I also made a small improvement to `hasUniqueRepresentation` WRT unions. Not necessary for this PR could be separated. `SpirvType` was failing both of these assertions. I resolved this by making it extern, and adding explicitly zeroed padding. I didn't yet add test coverage that type equality works on reified SPIRV types, as `zirReifySpirvType` returns unique values for each type regardless of the hash. See #35915 for more info.
MasonRemaley changed title from (削除) Adds unions support to hasUniqueRepresentation (削除ここまで) to Asserts InternPool keys have unique representations 2026年06月24日 08:25:19 +02:00
@ -903,0 +906,4 @@
if(!hasUniqueRepresentation(field_type))returnfalse;
}
returntrue;
},
Member
Copy link

I don't think this is correct for unions with auto layout. They can either have an explicit enum tag or an implicit safety tag, both of which can have padding bits. The check for each field should probably be @sizeOf(field_type) == @sizeOf(T) to allow extern unions and plain auto unions in unsafe release modes.

I guess we could also consider a more comprehensive check for tagged unions to accept the ones where hasUniqueRepresentation(tag_type) and @sizeOf(tag_type) + @sizeOf(field_type) == @sizeOf(T), this isn't possible for safety-tagged plain unions though since the safety tag cannot be accessed via @typeInfo.

Also there should be the same check for packed unions like there is for packed structs.

I don't think this is correct for unions with `auto` layout. They can either have an explicit enum tag or an implicit safety tag, both of which can have padding bits. The check for each field should probably be `@sizeOf(field_type) == @sizeOf(T)` to allow `extern` unions and plain `auto` unions in unsafe release modes. I guess we could also consider a more comprehensive check for tagged unions to accept the ones where `hasUniqueRepresentation(tag_type) and @sizeOf(tag_type) + @sizeOf(field_type) == @sizeOf(T)`, this isn't possible for safety-tagged plain unions though since the safety tag cannot be accessed via `@typeInfo`. Also there should be the same check for `packed` unions like there is for `packed` structs.
Owner
Copy link

Agree that the version in the PR is incorrect, however:

I guess we could also consider a more comprehensive check for tagged unions to accept the ones where [...]

This actually wouldn't be correct even for explicitly-tagged unions, because it turns out that the design of Zig does not require implementations to use the given tag type for the in-memory representation of a tagged union. For instance, a union(enum(u16)) with 256 or fewer fields could be represented in memory with a 1-byte tag---and this choice has no observable effects to the user, so is legal.

This means that the only auto-layout unions you can really let through here are the ones you initially suggested, where @sizeOf(FieldType) == @sizeOf(UnionType) for all fields.

Agree that the version in the PR is incorrect, however: > I guess we could also consider a more comprehensive check for tagged unions to accept the ones where [...] This actually wouldn't be correct even for explicitly-tagged unions, because it turns out that the design of Zig does not require implementations to use the given tag type for the in-memory representation of a tagged union. For instance, a `union(enum(u16))` with 256 or fewer fields *could* be represented in memory with a 1-byte tag---and this choice has no observable effects to the user, so is legal. This means that the only auto-layout unions you can really let through here are the ones you initially suggested, where `@sizeOf(FieldType) == @sizeOf(UnionType)` for all fields.
Author
Owner
Copy link

Good catch, not sure how I forgot that tags exist! I modified the check to be @sizeOf(field_type) == @sizeOf(T) and added handling for packed unions.

Good catch, not sure how I forgot that tags exist! I modified the check to be `@sizeOf(field_type) == @sizeOf(T)` and added handling for packed unions.
MasonRemaley marked this conversation as resolved
MasonRemaley force-pushed masonremaley/intern-pool-unique-key-reprs from 5be7234902
All checks were successful
ci / x86_64-netbsd-release (pull_request) Successful in 52m21s
ci / aarch64-macos-release (pull_request) Successful in 54m59s
ci / x86_64-freebsd-debug (pull_request) Successful in 1h2m37s
ci / x86_64-netbsd-debug (pull_request) Successful in 1h5m35s
ci / x86_64-freebsd-release (pull_request) Successful in 1h4m18s
ci / x86_64-openbsd-release (pull_request) Successful in 1h11m18s
ci / aarch64-macos-debug (pull_request) Successful in 1h13m50s
ci / x86_64-windows-release (pull_request) Successful in 1h13m25s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h21m18s
ci / x86_64-windows-debug (pull_request) Successful in 1h26m5s
ci / aarch64-linux-release (pull_request) Successful in 1h28m26s
ci / s390x-linux-release (pull_request) Successful in 1h42m5s
ci / powerpc64le-linux-release (pull_request) Successful in 1h58m4s
ci / x86_64-linux-debug (pull_request) Successful in 1h12m25s
ci / aarch64-linux-debug (pull_request) Successful in 2h32m25s
ci / s390x-linux-debug (pull_request) Successful in 2h57m19s
ci / powerpc64le-linux-debug (pull_request) Successful in 3h25m9s
ci / aarch64-freebsd-debug (pull_request) Has been skipped
ci / aarch64-freebsd-release (pull_request) Has been skipped
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h47m14s
ci / aarch64-netbsd-debug (pull_request) Has been skipped
ci / aarch64-netbsd-release (pull_request) Has been skipped
ci / x86_64-linux-release (pull_request) Successful in 3h57m54s
ci / loongarch64-linux-release (pull_request) Successful in 2h27m34s
ci / loongarch64-linux-debug (pull_request) Successful in 3h46m18s
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
to f20ae0a681
Some checks failed
ci / aarch64-macos-release (pull_request) Failing after 1h27m38s
ci / aarch64-macos-debug (pull_request) Failing after 2h16m9s
ci / x86_64-netbsd-debug (pull_request) Failing after 1h4m29s
ci / x86_64-netbsd-release (pull_request) Failing after 1h1m47s
ci / powerpc64le-linux-release (pull_request) Failing after 1h48m29s
ci / aarch64-linux-release (pull_request) Failing after 1h15m12s
ci / x86_64-freebsd-release (pull_request) Failing after 48m0s
ci / x86_64-freebsd-debug (pull_request) Failing after 1h3m29s
ci / aarch64-linux-debug (pull_request) Failing after 2h6m36s
ci / x86_64-openbsd-release (pull_request) Failing after 1h7m23s
ci / x86_64-openbsd-debug (pull_request) Failing after 1h15m10s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
2026年06月24日 21:44:40 +02:00
Compare
MasonRemaley force-pushed masonremaley/intern-pool-unique-key-reprs from f20ae0a681
Some checks failed
ci / aarch64-macos-release (pull_request) Failing after 1h27m38s
ci / aarch64-macos-debug (pull_request) Failing after 2h16m9s
ci / x86_64-netbsd-debug (pull_request) Failing after 1h4m29s
ci / x86_64-netbsd-release (pull_request) Failing after 1h1m47s
ci / powerpc64le-linux-release (pull_request) Failing after 1h48m29s
ci / aarch64-linux-release (pull_request) Failing after 1h15m12s
ci / x86_64-freebsd-release (pull_request) Failing after 48m0s
ci / x86_64-freebsd-debug (pull_request) Failing after 1h3m29s
ci / aarch64-linux-debug (pull_request) Failing after 2h6m36s
ci / x86_64-openbsd-release (pull_request) Failing after 1h7m23s
ci / x86_64-openbsd-debug (pull_request) Failing after 1h15m10s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
to 092ad78c46
Some checks failed
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-freebsd-debug (pull_request) Has been cancelled
ci / x86_64-freebsd-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-netbsd-debug (pull_request) Has been cancelled
ci / x86_64-netbsd-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / aarch64-macos-release (pull_request) Has been cancelled
2026年06月25日 07:10:51 +02:00
Compare
MasonRemaley force-pushed masonremaley/intern-pool-unique-key-reprs from 092ad78c46
Some checks failed
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-freebsd-debug (pull_request) Has been cancelled
ci / x86_64-freebsd-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-netbsd-debug (pull_request) Has been cancelled
ci / x86_64-netbsd-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / aarch64-macos-release (pull_request) Has been cancelled
to 87860e80b4
Some checks failed
ci / aarch64-macos-release (pull_request) Successful in 1h0m2s
ci / aarch64-macos-debug (pull_request) Successful in 1h15m6s
ci / aarch64-linux-release (pull_request) Successful in 1h34m37s
ci / x86_64-netbsd-release (pull_request) Successful in 48m6s
ci / x86_64-freebsd-debug (pull_request) Successful in 57m24s
ci / x86_64-netbsd-debug (pull_request) Successful in 52m31s
ci / x86_64-freebsd-release (pull_request) Successful in 52m20s
ci / powerpc64le-linux-release (pull_request) Successful in 2h20m59s
ci / aarch64-linux-debug (pull_request) Successful in 2h37m4s
ci / x86_64-openbsd-release (pull_request) Successful in 54m8s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h3m43s
ci / x86_64-windows-release (pull_request) Successful in 1h19m15s
ci / x86_64-windows-debug (pull_request) Successful in 1h26m12s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h53m37s
ci / x86_64-linux-debug (pull_request) Successful in 1h0m31s
ci / s390x-linux-release (pull_request) Successful in 1h36m11s
ci / s390x-linux-debug (pull_request) Successful in 2h38m56s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 4h17m47s
ci / x86_64-linux-release (pull_request) Successful in 4h24m33s
ci / aarch64-freebsd-debug (pull_request) Has been skipped
ci / aarch64-freebsd-release (pull_request) Has been skipped
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
2026年06月25日 07:12:10 +02:00
Compare
andrewrk requested changes 2026年06月25日 20:24:58 +02:00
Dismissed
@ -900,6 +900,15 @@ pub inline fn hasUniqueRepresentation(comptime T: type) bool {
return@sizeOf(T)==sum_size;
},
.@"union"=>|info|{
Owner
Copy link

auto layout unions have non-well-defined memory layout

auto layout unions have non-well-defined memory layout
Owner
Copy link

Regardless of what the language specification guarantees, if the size of the union exactly equals the size of all fields, then we know the union layout has no unused/padding bits (which is effectively what this function is trying to figure out). I could be down for saying that we should ignore the "actual" layout here and just return false for any type with ill-defined layout, but that is not the current behaviour on e.g. struct types, so what Mason has implemented here is consistent with the current behaviour.

Regardless of what the language specification guarantees, if the size of the union exactly equals the size of all fields, then we know the union layout has no unused/padding bits (which is effectively what this function is trying to figure out). I could be down for saying that we should ignore the "actual" layout here and just return `false` for any type with ill-defined layout, but that is not the current behaviour on e.g. `struct` types, so what Mason has implemented here is consistent with the current behaviour.
Owner
Copy link

I see, I suppose that is an OK definition of this function. This might bite us in the ass later though when we try to introduce tooling to find unsound operations on memory.

I see, I suppose that is an OK definition of this function. This might bite us in the ass later though when we try to introduce tooling to find unsound operations on memory.
Author
Owner
Copy link

Moving convo to #35944

Moving convo to #35944
Owner
Copy link

Thanks for making a followup issue!

Thanks for making a followup issue!
Sign in to join this conversation.
No reviewers
Labels
Clear labels
abi/f32
abi/ilp32
abi/sf
accepted
This proposal is planned.
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
The web application for interactive documentation and generation of its assets.
backend/c
The C backend outputs C source code.
backend/llvm
The LLVM backend outputs an LLVM bitcode module.
backend/self-hosted
The self-hosted backends produce machine code directly.
binutils
Zig's included binary utilities: zig ar, zig dlltool, zig lib, zig ranlib, zig objcopy, and zig rc.
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
build system
The Zig build system - zig build, std.Build, the build runner, and package management.
debug info
An issue related to debug information (e.g. DWARF) produced by the Zig compiler.
docs
An issue with documentation, e.g. the language reference or standard library doc comments.
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, ZonGen, Sema, Legalize, and Liveness.
fuzzing
An issue related to Zig's integrated fuzz testing.
incremental
Reuse of internal compiler state for faster compilation.
lib/c
This issue relates to Zig's libc implementation and/or vendored libcs.
lib/compiler-rt
This issue relates to Zig's compiler-rt library.
lib/cxx
This issue relates to Zig's vendored libc++ and/or libc++abi.
lib/std
This issue relates to Zig's standard library.
lib/tsan
This issue relates to Zig's vendored libtsan.
lib/ubsan-rt
This issue relates to Zig's ubsan-rt library.
lib/unwind
This issue relates to Zig's vendored libunwind.
linking
Zig's integrated object file and incremental linker.
miscompilation
The compiler reports success but produces semantically incorrect code.
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
This issue suggests language modifications. If it also has the "accepted" label then it is planned.
release notes
This issue or pull request should be mentioned in the release notes.
testing
This issue is related to testing the compiler, standard library, or other parts of Zig.
zig cc
Zig as a drop-in C-family compiler.
zig fmt
The Zig source code formatter.
zig reduce
The Zig source code reduction tool.
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig!35914
Reference in a new issue
ziglang/zig
No description provided.
Delete branch "masonremaley/intern-pool-unique-key-reprs"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?