Compared to 2.12.xx rdfwriteheader() writes the object length and header
length in flipped order. Issue seems to have been introduced by commit
8dc965347d.
BR3392717
Signed-off-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In 78f14ab1a6 the fix
is incomplete, we should move free procedure out of
the list_for_each traverse.
CID 1432930
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Better point out explicitly that SMacro::next member
is untouched, thus do not use SMacro::next and an array.
CID 1432925
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
If new list is not needed then we should free memory
allocated by nasm_basename and nasm_dirname calls.
CID 1432930
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Coverity scan tool complains on rdffile::rdoff_ver member
being called with memcpy uninitialized. Lets zap this
structure explicitly once we've it allocated.
CID 1432931
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Currently we strip newlines from files on read and write
procedures for better diff output, but as being pointed
by hpa@ this makes quite inconvenient to work with tests
in a manual mode.
Thus lets left outputs as is. We have to update all tests
with template outputs since by default output streams are
ending with newline.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
When we process a TOKEN_QMARK we also need to advance p, in order to
get the proper start for the next token.
This fixes travis test br3392707.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Fix circular dependency on asm/warnings.c by factoring out
warnings.$(O) from the dependencies, and use a separate <file>.time
which "generate" the main source file as a "side effect", giving us a
null target.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The operation of the ',' and ')' tokens are very similar, except for:
',' issues a error if the processed parameter is greedy;
')' sets the "done" variable.
The code would incorrectly set "done" for a ',' token. This fixes
travis test br3392711.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
These two symbolic names were reversed. In practice, the code uses '('
and ')' instead, so it wasn't a problem, but still very confusing.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
When pasting and stripping %+ and whitespace tokens, we either need to
set *nextp in the loop, or treat next as a separate variable and
update *nextp after the loop finishes. This implements the second
option.
This fixes travis test "amx".
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Add the %eval() preprocessor function. It evaluates each of its
arguments like a number and expands to a comma-separated lists of the
evaluated arguments.
To support this, add the concept of "true varadic" macros, which are
only used internally. True varadic macros differ from greedy macros in
that the parameter list is still parsed as individual parameters and
provided to the expansion function. As this isn't meaningful for
user-defined macros, there is no way to specify it from a directive.
Add back the %isnfoo() functions. Although one could just as well write
!%isfoo(), it doesn't cost much to provide them, and might help avoid
programmer confusion.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
We need the ability to produce consistent output for our own tests,
anyway, so make this a user-accessible feature. This was requested in
BR 3392635.
This obsoletes the NASM_TEST_RUN environment variable; simply use the
normal NASMENV environment variable instead.
The .obj tests in travis needed to be updated in order to remove the
rather pointless suffix " CONST" from the NASM signatures.
Reported-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The "warnstack" test is supposed to test the warning stack, but the
[warning] directive is never seen in preprocess-only mode, so run it
in -f bin mode.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
%ifid $ and %ifid $$ has traditionally been false, revert to that
behavior.
Reported-by: Mike Hommey <mh+anfz@glandium.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
NASM 2.15.04
Conflicts:
asm/listing.h
asm/pptok.pl
asm/preproc.c
version
This doesn't pass travis test 3392711, which is using an extremely odd
construct of %?? in the middle of an argument sequence for an smacro
while not being in a macro itself, and expecting it to expand to the
macro name. This seems to *really* confuse the master branch.
Resolve this later...
At least DWARF can encode C-style macros. In doing so, it wants the
file include hierarchy, so give the debug format backend the option of
receiving that information from the preprocessor.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Just stub out "org" as a macro to be able to read source files that
are designed for the .bin format.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>