# stage2: prevent UB in the LLVM backend · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/87779cfd93fdcb525f386d693a099e4188a3fc44)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 87779cfd93fdcb525f386d693a099e4188a3fc44

Requested commit: 87779cfd93fdcb525f386d693a099e4188a3fc44

Commit: 87779cfd93fdcb525f386d693a099e4188a3fc44

Tree: d5dab5dfbd5a5d93645996fde1c9c1199e2adf0b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: prevent UB in the LLVM backend

 * Sema: fix `zirTypeInfo` allocating with the wrong arenas for some
   stuff.
 * LLVM: split `airDbgInline` into two functions, one for each AIR tag.
   - remove the redundant copy to type_map_arena. This is the first
     thing that lowerDebugType does so this hack was probably just
     accidentally avoiding UB (which is still present prior to this
     commit).
   - don't store an inline fn inst into the di_map for the generic
     decl.
   - use a dummy function type for the debug info to avoid whatever UB
     is happening.
   - we are now ignoring the function type passed in with the
     dbg_inline_begin and dbg_inline_end.
 * behavior tests: prepare the vector tests to be enabled one at a time.

Mitigates #11199.

```

## Parents

- [79d3780fbda475a50d6e0ca53d51c9e7c7690ab1](https://git.cafe/gitcafe/zig/commit/79d3780fbda475a50d6e0ca53d51c9e7c7690ab1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/87779cfd93fdcb525f386d693a099e4188a3fc44?format=markdown)
