#240 new
Zhe Fang

Bad gas syntax .if directive parsing

Reported by Zhe Fang | October 7th, 2011 @ 02:49 AM

I tried to use yasm to compile something contains assembly files and seems heavily depends on gas ver. 2+, failed with segmentation fault. Traced a little:

The cause is in <eval_expr>, line 481 @ gas-preproc.c, expr = evaluate(...) leaves a zero in expr, and thus yasm_expr_get_intnum(&expr, 0) operating on expr will be trapped.

Also found a test-case, test.S file with just one line:

.if 1+1==2;

Compile with yasm -p gas test.S will cause the problem.

Tested with latest HEAD.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket