Crash if db string is too long
Bug #691412 reported by
BlackCow
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnusim8085 |
New
|
Undecided
|
Unassigned |
Bug Description
This program causes GNUsim8085 to crash and close without warning,
jmp start
;data
data: db 01h,02h,
;code
start: nop
hlt
It will work up to 1Ah.
If you define up to 1Bh, it will say the program has errors on line 3 (Undefined symbol and DB: Operand error).
Up to 1Ch it will crash with a Segmentation Fault to the terminal.
I'm running version 1.3.6-1 in Ubuntu 10.04
description: | updated |
Changed in gnusim8085: | |
milestone: | none → 1.3.8 |
To post a comment you must log in.
This problem is due to the following structure ASM_DS_ MAX_OPCODE_ LENGTH] ;
typedef struct
{
gint op_num; /* >= 256 */
gchar op_str[
gint user_args; /* 0 - no arg, n args seperated by comma */
} IdPseudo;
ASM_DS_MAX_OPERAND which is default to 100. If anything over this causes problem.
We need to dynamically change this size based on input (also keeping the max size configurable ... It would be better to add config module for all these ... )