Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#260 gpasm crash on syntax error in included file

None
closed
Borut Ražem
None
1
2013-01-09
2013-01-09
Borut Ražem
No

Antonio Todo Bom reported the following bug:


The problem was that it generates a different error, at different versions
of gputils.
One (older) mentioning flex, and at the actual version, froze with a glibc
error.

Trying to reproduce the same error with small code, I have another error, a
segmentation fault. Wow! Below the 2 files to this.

--- Ctrl-C Ctrl-V of terminal commands ----

sysop@sabbia:~/devel/teste$ cat test.asm

  ;  list      p=16f628a    ; list directive to define processor
    #INCLUDE  <p16f628a.inc> ; processor specific variable definitions
    __CONFIG   _CP_ON & _WDT_ON & _LVP_OFF & _BODEN_ON & _PWRTE_ON &
_INTRC_OSC_NOCLKOUT & _MCLRE_OFF

org 0x000 ; ponto inicial do programa

reset:
goto main ; pula pra inicializar chip

;************************************************
; ROTINA DE TRATAMENTO DE INTERRUPCOES
;************************************************

org 0x004 ;
trata_isr:
movwf 34 ; salva registro Wrotina de encriptacao

    #INCLUDE  <includedfile.inc>

main:
movwf PORTA

  end

sysop@sabbia:~/devel/teste$ cat includedfile.inc

7    ;  <<<---- Here a character that causes the error

test:
movlw 0
 return

sysop@sabbia:~/devel/ppc900$ gpasm -pp16f628a test.asm
Falha de segmentação (imagem do núcleo gravada)
sysop@sabbia:~/devel/teste$

Thank you Mr. Borut Ražem.

Regards,

Antonio Todo Bom

Discussion

  • Borut Ražem
    Borut Ražem
    2013-01-09

    Minimal case to reproduce the problem is:

    test.asm:

      #INCLUDE  <includedfile.inc>
      end
    

    includedfile.inc:

    7    ;  <<<---- Here a character that causes the error
    

    In this case gpasm crashes with:

    *** glibc detected *** gpasm: double free or corruption (fasttop): 0x0000000001f2b250 ***
    

    Borut

     
  • I tested with all situations that I had problems before. And now does not freezes anymore, so, it indicates correctly the error type and line.

    Thank you! :)

     


Anonymous


Cancel   Add attachments