Dear all, The following bug was found with AFLFast, a fork of AFL, in a 24 hour fuzzing session on Binutils. Thanks also to Van-Thuan Pham. The assembler fails with an assertion violation for the following execution on Ubuntu 16.04 x86_64 and 14.04 x86_64 for Binutils v2.26.1 and trunk. It works fine for v2.24: $ printf "\"\x00.=&%%/ 0" > test $ ./as test test: Assembler messages: test: Warning: end of file in string; '"' inserted test:1: Warning: missing closing '"' test:1: Error: expecting mnemonic; got nothing test:1: Internal error! Assertion failure in operand at expr.c:1375. Please report this bug. SKIP_WHITESPACE really skips only one space-character, so that the next character can indeed be another space-character. Best regards, - Marcel
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=14c1428b29fff12d8119ce6f4703be0de08197af commit 14c1428b29fff12d8119ce6f4703be0de08197af Author: Nick Clifton <nickc@redhat.com> Date: Mon Dec 5 16:54:59 2016 +0000 Fix ICE in assembler when passed a bogus input file. PR gas/20904 * as.h (SKIP_ALL_WHITESPACE): New macro. * expr.c (operand): Use it.
Hi Marcel, Thanks for reporting this bug. I have added a new macro: SKIP_ALL_WHITESPACE to avoid this problem. Cheers Nick