AFL build fail

714 views
Skip to first unread message

Quoc-Sang Phan

unread,
Jul 24, 2017, 7:22:09 PM7/24/17
to afl-users
Hi,

I got the following error when trying to build the latest AFL:

[-] PROGRAM ABORT : Endless loop when calling 'as' (remove '.' from your PATH)
         Location : main(), afl-as.c:518

Here is my PATH, there is no "." in it:

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Could you tell me if I'm missing anything?

Cheers,
Sang

Michal Zalewski

unread,
Jul 24, 2017, 8:21:11 PM7/24/17
to afl-users
[-] PROGRAM ABORT : Endless loop when calling 'as' (remove '.' from your PATH)
         Location : main(), afl-as.c:518

Here is my PATH, there is no "." in it:

Did you do anything else beforehand? Like trying to install AFL? Do you have AFL_AS set?

What happens when you run 'which as'? 

Is this on MacOS X? Are you using afl-gcc or afl-clang?

/mz

Quoc-Sang Phan

unread,
Jul 25, 2017, 12:54:06 PM7/25/17
to afl-users
I figured it out. I did mess up my PATH.
I can compile OK now.

Jakub Wilk

unread,
Jul 25, 2017, 2:16:02 PM7/25/17
to afl-...@googlegroups.com
* Quoc-Sang Phan <dark2...@gmail.com>, 2017-07-24, 16:22:
>[-] PROGRAM ABORT : Endless loop when calling 'as' (remove '.' from your PATH)

Michal, could you make afl-as print actual directory where it resides (i.e.
dirname(argv[0])) instead of literal "."? This should make debugging easier.

--
Jakub Wilk

Michal Zalewski

unread,
Jul 25, 2017, 3:06:55 PM7/25/17
to afl-users
>> [-] PROGRAM ABORT : Endless loop when calling 'as' (remove '.' from your
>> PATH)
>
> Michal, could you make afl-as print actual directory where it resides (i.e.
> dirname(argv[0])) instead of literal "."? This should make debugging easier.

How does this happen, though? (Other than '.' in $PATH.) I'd be
worried about telling people to remove /usr/bin/ from their path if
that's where the AFL source somehow ended up =)

/mz

Jakub Wilk

unread,
Jul 25, 2017, 4:13:47 PM7/25/17
to afl-...@googlegroups.com
* Michal Zalewski <lca...@gmail.com>, 2017-07-25, 12:06:
>>>[-] PROGRAM ABORT : Endless loop when calling 'as' (remove '.' from your
>>>PATH)
>>
>>Michal, could you make afl-as print actual directory where it resides (i.e.
>>dirname(argv[0]))

On a second thought, argv[0] wouldn't have the full path, so you'd have to do
readlink("/proc/self/exe", ...) or something. Meh, not worth the trouble.

>I'd be worried about telling people to remove /usr/bin/ from their path if
>that's where the AFL source somehow ended up =)

ACK.

--
Jakub Wilk
Reply all
Reply to author
Forward
0 new messages