Go to file
Igor Munkin f95c7e983c preproc: prohibit unmacro while macro expansion
If macro is undefined while it's being expanded, use after free occurs,
since the MMacro instance is released, but it is still used to proceed
the expansion.

This change forbids macro undefinition: non-fatal error is raised and
the MMacro instance is not released if it is being processed by NASM
preprocessor.

Consider the following example:
| $ cat test.asm
| %macro m 0
| %unmacro m 0
| %endmacro
| m
| $ ./nasm test.asm
| test.asm:4: error: `%unmacro' can't undefine the macro being expanded
| test.asm:2: ... from macro `m' defined here

Fixes BR3392531 and BR3392716.

Signed-off-by: Igor Munkin <imun@cpan.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2020-12-31 16:42:31 +03:00
asm preproc: prohibit unmacro while macro expansion 2020-12-31 16:42:31 +03:00
autoconf autoconf: look for _Decltype as yet another alias for typeof(). 2020-07-16 20:28:35 -07:00
common Don't sort opcodes; move all pseudo-ops to the beginning 2017-05-01 21:44:24 -07:00
config config/unconfig.h: still needs to be in the repository 2020-07-08 08:53:28 -07:00
contrib contrib/MSVC6.txt: Add guide how to use nasm in MSVC6 2010-01-24 23:17:55 +03:00
disasm Add support for new instructions from ISE June 2020 2020-07-16 21:52:15 -07:00
doc doc/changes: Document rdf header fix 2020-10-10 13:36:54 +03:00
headers headers: Update year 2010-04-25 12:02:38 +04:00
include Add option to create reproducible output 2020-08-27 13:06:08 -07:00
macros fp: support bfloat16 constants 2020-07-16 23:11:03 -07:00
misc Move <string.h> inclusion to compiler.h 2018-12-26 06:32:37 -08:00
Mkfiles Makefile.in: fix warning dependencies 2020-09-11 18:11:51 -07:00
nasmlib Add option to create reproducible output 2020-08-27 13:06:08 -07:00
nsis nsis: use /solid compression for smaller size 2017-04-07 11:05:09 -07:00
output Add option to create reproducible output 2020-08-27 13:06:08 -07:00
perllib phash: bloat the hashes somewhat, reducing the likelihood of false positives 2020-07-27 13:24:59 -07:00
rdoff rdoff/rdfwriteheader: Write object length and header length in correct order 2020-10-10 00:13:07 +03:00
stdlib vsnprintf.c: fix printing of a size_t variable 2020-07-09 17:44:21 -07:00
test BR 3392705: AVX512: reinstate the SSE-like opcodes for VPCMPEQ/GT 2020-07-30 16:56:52 -07:00
tools config/unconfig.h: generate by Makefile, not autogen.sh 2020-07-06 11:12:03 -07:00
travis preproc: prohibit unmacro while macro expansion 2020-12-31 16:42:31 +03:00
x86 Fix inefficient encoding of MPX instructions 2020-08-13 17:21:00 -07:00
.gitattributes gitattributes: don't try to merge the version file 2020-06-30 13:48:13 -07:00
.gitignore .gitignore: ignore timestamp (*.time) files 2020-09-11 16:28:57 -07:00
.travis.yml travis: Disable osx for a while 2018-10-17 21:40:14 +03:00
AUTHORS Correct name spelling and email address 2015-01-18 20:21:14 +02:00
autogen.sh config/unconfig.h: generate by Makefile, not autogen.sh 2020-07-06 11:12:03 -07:00
ChangeLog Documention Changes for Release 2.00 2007-11-25 14:25:13 -08:00
CHANGES Move the revision history into the documentation 2008-07-14 02:45:57 -04:00
configure.ac configure.ac: add option to compile with suggestion warnings 2020-07-30 17:37:42 -07:00
INSTALL Update the INSTALL file to match current reality 2008-06-28 18:53:55 -07:00
LICENSE LICENSE: update year 2010-08-12 20:15:27 -07:00
Makefile.in Makefile.in: fix warning dependencies 2020-09-11 18:11:51 -07:00
nasm.spec.in nasm.spec.in: need perl; .pdf.xz now build by standard Makefile 2020-06-04 17:17:28 -07:00
nasm.spec.sed nasm.spec: use a sed file to insert perl dependencies 2017-04-23 18:54:23 -07:00
nasm.txt Add group aliases for all prefixed warnings. 2019-06-06 20:53:17 -07:00
ndisasm.txt ndisasm: man -- Add missing -p option 2013-04-20 20:18:46 +04:00
README.md doc: remove references to sourceforge 2020-07-01 21:48:44 -07:00
SubmittingPatches Add SubmittingPatches file 2010-10-03 21:02:08 +04:00
version NASM 2.15.05 2020-08-28 08:53:28 -07:00
version.pl preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00

NASM, the Netwide Assembler

master

Many many developers all over the net respect NASM for what it is: a widespread (thus netwide), portable (thus netwide!), very flexible and mature assembler tool with support for many output formats (thus netwide!!).

Now we have good news for you: NASM is licensed under the "simplified" (2-clause) BSD license. This means its development is open to even wider society of programmers wishing to improve their lovely assembler.

Visit our nasm.us website for more details.

With best regards, the NASM crew.