preproc: Fix nil dereference on error paths
[nasm.git] / test / br3392538.asm
blob3d9f518649e040f50b3066cb79f732eaf3c450c5
1 bits 64
2 default rel
4 section .text
5 global _start
6 _start:
8 mov rax, 1 ; write syscall
9 mov rdi, 1
10 mov rsi, msg
11 mov rdx, msglen
12 syscall
14 mov rax, 60 ; exit syscall
15 sub rdi, rdi
16 syscall
18 ; either of the following lines cause: Error in `nasm': double free or corruption ; Aborted (core dumped)
19 foo
20 ; warning: label alone on a line without a colon might be in error [-w+orphan-labels]
21 mov r8, r9, r10
22 ; error: invalid combination of opcode and operands
23 add r8d, byte 80h
24 ; warning: signed byte value exceeds bounds [-w+number-overflow]
25 section .data
26 msg db "Hello, world!", 10
27 msglen equ $-msg