← Back to team overview

gnusim8085-devel team mailing list archive

[Bug 691412] Re: Crash if db string is too long

 

This problem is due to the following structure 
typedef struct
{
  gint op_num; /* >= 256 */
  gchar op_str[ASM_DS_MAX_OPCODE_LENGTH];
	
  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 ... )

-- 
You received this bug notification because you are a member of
GNUSim8085 developers, which is subscribed to gnusim8085.
https://bugs.launchpad.net/bugs/691412

Title:
  Crash if db string is too long

Status in gnusim8085:
  New

Bug description:
  This program causes GNUsim8085 to crash and close without warning,

  jmp start
  ;data
  data: db 01h,02h,03h,04h,05h,06h,07h,08h,09h,0Ah,0Bh,0Ch,0Dh,0Eh,0Fh,10h,11h,12h,13h,14h,15h,16h,17h,18h,19h,1Ah,1Bh,1Ch
  ;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





References