From komh78 at gmail.com Mon Apr 1 05:14:14 2024 From: komh78 at gmail.com (KO Myung-Hun) Date: Mon, 01 Apr 2024 21:14:14 +0900 Subject: [Nasm-devel] Compilation fails on master branch Message-ID: <660AA516.50705@gmail.com> Hi/2. I've tried to compile on master branch. However, it failed due to `ATTRIBUTE', which seems to be a macro, like: ----- gcc -c -std=c17 -Werror=attributes -g -O2 -fwrapv -ftrivial-auto-var-init=zero -U__STRICT_ANSI__ -fno-common -Werror=attributes -Wall -W -pedantic -Wc90-c99-compat -Wno-long-long -Wno-stringop-truncation -Wno-shift-negative-value -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=strict-prototypes -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -o stdlib/snprintf.o stdlib/snprintf.c In file included from ./include/compiler.h:58, from asm/nasm.c:38: ./config/config.h:851:22: error: function declaration isn't a prototype [-Werror=strict-prototypes] 851 | # define never_null ATTRIBUTE(returns_nonnull) | ^~~~~~~~~ ./include/compiler.h:303:24: note: in expansion of macro 'never_null' 303 | #define safe_alloc never_null malloc_func | ^~~~~~~~~~ ./include/compiler.h:306:33: note: in expansion of macro 'safe_alloc' 306 | #define safe_malloc(s) safe_alloc alloc_size_func1(s) | ^~~~~~~~~~ ./include/nasmlib.h:64:8: note: in expansion of macro 'safe_malloc' 64 | void * safe_malloc(1) nasm_malloc(size_t); | ^~~~~~~~~~~ ./include/nasmlib.h: In function 'ATTRIBUTE': ./config/config.h:867:23: error: expected declaration specifiers before 'ATTRIBUTE' 867 | # define malloc_func ATTRIBUTE(malloc) | ^~~~~~~~~ [...] ----- If I define `ATTRIBUTE(x)=__attribute__((x))', all the problems go away. I'm using gcc v12.3.0. What's the problem ? -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/ From zhougeng at mail.zgclab.edu.cn Sat Apr 6 18:43:54 2024 From: zhougeng at mail.zgclab.edu.cn (=?UTF-8?B?5ZGo6LWT?=) Date: Sun, 7 Apr 2024 09:43:54 +0800 (GMT+08:00) Subject: [Nasm-devel] nasm_crash_report Message-ID: <486727c6.36d7e.18eb639f0cc.Coremail.zhougeng@mail.zgclab.edu.cn> Hi, we found several crashes in NASM 2.16.02rc10, which is the latest version. To assist in diagnosing and resolving these issues including two segmentation violation and three heap use-after-free, we have attached the POC files along with the gdb/asan logs? Credit by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory. Thanks for your time and attention to these matters. Best regards, Zhou Geng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nasm_crash_report.md Type: application/octet-stream Size: 8296 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nasm_poc.zip Type: application/x-zip-compressed Size: 84970 bytes Desc: not available URL: