From 5079ea0b015547e8e36e047968ed20832a487f18 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 24 Dec 2018 12:41:57 -0800 Subject: BR 3392538: test case for double free in listing module Test case from bug 3392538 for double free in the listing module. This is the test case only, not a fix. Reported-by: Signed-off-by: H. Peter Anvin --- test/br3392538.asm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/br3392538.asm diff --git a/test/br3392538.asm b/test/br3392538.asm new file mode 100644 index 00000000..3d9f5186 --- /dev/null +++ b/test/br3392538.asm @@ -0,0 +1,27 @@ + bits 64 + default rel + + section .text + global _start +_start: + + mov rax, 1 ; write syscall + mov rdi, 1 + mov rsi, msg + mov rdx, msglen + syscall + + mov rax, 60 ; exit syscall + sub rdi, rdi + syscall + +; either of the following lines cause: Error in `nasm': double free or corruption ; Aborted (core dumped) +foo +; warning: label alone on a line without a colon might be in error [-w+orphan-labels] + mov r8, r9, r10 +; error: invalid combination of opcode and operands + add r8d, byte 80h +; warning: signed byte value exceeds bounds [-w+number-overflow] + section .data +msg db "Hello, world!", 10 +msglen equ $-msg -- cgit v1.2.1