[Ecls-list] BUG: SEGMENTATION-VIOLATION in code with DEFTYPE unicode char

Eric Marsden eric.marsden at free.fr
Mon Nov 14 09:03:26 UTC 2011


>>>>> "jgr" == Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> writes:

  jgr> This will give us a clue about the quality of the generated code -- I am
  jgr> asking because in my OS X it looks just fine.

  Here is the result of attaching gdb.
  
,----
| Program received signal SIGSEGV, Segmentation fault.
| [Switching to Thread 0x7f256ac2c700 (LWP 27462)]
| ecl_char_upcase (code=-2) at /usr/local/src/ecl/src/c/char_ctype.d:171
| 171		if (c[0] == 1) {
| (gdb) print c[0]
| Cannot access memory at address 0x3f8
| (gdb) disassemble
| Dump of assembler code for function ecl_char_upcase:
|    0x00007f256a61ccc0 <+0>:	push   %rbx
|    0x00007f256a61ccc1 <+1>:	mov    %edi,%ebx
|    0x00007f256a61ccc3 <+3>:	callq  0x7f256a53f720 <ucd_char_data at plt>
| => 0x00007f256a61ccc8 <+8>:	cmpb   $0x1,(%rax)
|    0x00007f256a61cccb <+11>:	jne    0x7f256a61cce3 <ecl_char_upcase+35>
|    0x00007f256a61cccd <+13>:	movzbl 0x2(%rax),%edx
|    0x00007f256a61ccd1 <+17>:	movzbl 0x1(%rax),%ebx
|    0x00007f256a61ccd5 <+21>:	movzbl 0x3(%rax),%eax
|    0x00007f256a61ccd9 <+25>:	shl    $0x8,%edx
|    0x00007f256a61ccdc <+28>:	add    %edx,%ebx
|    0x00007f256a61ccde <+30>:	shl    $0x10,%eax
|    0x00007f256a61cce1 <+33>:	add    %eax,%ebx
|    0x00007f256a61cce3 <+35>:	mov    %ebx,%eax
|    0x00007f256a61cce5 <+37>:	pop    %rbx
|    0x00007f256a61cce6 <+38>:	retq   
| End of assembler dump.
`----
  
-- 
Eric Marsden





More information about the ecl-devel mailing list