Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment Fault music.c:2143 in set_lines #74

Open
PangPangpeng opened this issue Jul 25, 2020 · 1 comment
Open

Segment Fault music.c:2143 in set_lines #74

PangPangpeng opened this issue Jul 25, 2020 · 1 comment

Comments

@PangPangpeng
Copy link

gdb-peda$ set args ./pocs/poc2
gdb-peda$ run
Starting program: /root/Intriguer/intriguer/opensoft/abc2music/origin/abcm2ps ./pocs/poc2
abcm2ps-8.14.9 (2020-06-21)
File ./pocs/poc2
warning: No unit "50.75"
./pocs/poc2:88:3: warning: Line overfull (42pt of 21pt)

Program received signal SIGSEGV, Segmentation fault.
[----------------------------------registers-----------------------------------]
RAX: 0x0
RBX: 0x0
RCX: 0x6e1d78 --> 0x6be7c0 --> 0x6bea10 --> 0x6bec60 --> 0x6beeb0 --> 0x6bf100 (--> ...)
RDX: 0x0
RSI: 0x0
RDI: 0x6be0d0 --> 0x6be320 --> 0x6be570 --> 0x6be7c0 --> 0x6bea10 --> 0x6bec60 (--> ...)
RBP: 0x6cbb38 --> 0x6cbd88 --> 0x6cbfd8 --> 0x6cc228 --> 0x6cc478 --> 0x6cc6c8 (--> ...)
RSP: 0x7fffffffde40 --> 0x41a6000000000000
RIP: 0x427734 (<set_lines+324>: movss xmm0,DWORD PTR [rbx+0x68])
R8 : 0xc0
R9 : 0x0
R10: 0x0
R11: 0x246
R12: 0x2aaaaaab
R13: 0x6be0d0 --> 0x6be320 --> 0x6be570 --> 0x6be7c0 --> 0x6bea10 --> 0x6bec60 (--> ...)
R14: 0x0
R15: 0x0
EFLAGS: 0x10242 (carry parity adjust ZERO sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
0x427725 <set_lines+309>: jmp 0x427903 <set_lines+787>
0x42772a <set_lines+314>: nop WORD PTR [rax+rax*1+0x0]
0x427730 <set_lines+320>: mov rbx,QWORD PTR [rbx+0x28]
=> 0x427734 <set_lines+324>: movss xmm0,DWORD PTR [rbx+0x68]
0x427739 <set_lines+329>: ucomiss xmm0,xmm2
0x42773c <set_lines+332>: jp 0x427740 <set_lines+336>
0x42773e <set_lines+334>: je 0x427730 <set_lines+320>
0x427740 <set_lines+336>: movss xmm3,DWORD PTR [rbx+0x88]
[------------------------------------stack-------------------------------------]
0000| 0x7fffffffde40 --> 0x41a6000000000000
0008| 0x7fffffffde48 --> 0x0
0016| 0x7fffffffde50 --> 0x0
0024| 0x7fffffffde58 --> 0x6cbb38 --> 0x6cbd88 --> 0x6cbfd8 --> 0x6cc228 --> 0x6cc478 (--> ...)
0032| 0x7fffffffde60 --> 0x6be0d0 --> 0x6be320 --> 0x6be570 --> 0x6be7c0 --> 0x6bea10 (--> ...)
0040| 0x7fffffffde68 --> 0x1
0048| 0x7fffffffde70 --> 0xff00000000ff
0056| 0x7fffffffde78 --> 0x428966 (<output_music+3974>: test rax,rax)
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
set_lines (first=first@entry=0x6be0d0, last=last@entry=0x6cbb38, lwidth=lwidth@entry=20.75, indent=) at music.c:2142
2142 while (s->x == 0 || s->x + s->shrink * 2 >= xmax)
gdb-peda$ bt
#0 set_lines (first=first@entry=0x6be0d0, last=last@entry=0x6cbb38, lwidth=lwidth@entry=20.75, indent=) at music.c:2142
#1 0x0000000000428966 in cut_tune (indent=, lwidth=) at music.c:2234
#2 output_music () at music.c:5108
#3 0x000000000042e971 in generate () at parse.c:1042
#4 0x000000000042ef78 in gen_ly (eob=eob@entry=0x0) at parse.c:1063
#5 0x0000000000434a60 in do_tune () at parse.c:3636
#6 0x00000000004088e2 in abc_parse (p=0x6943f0 "", fname=fname@entry=0x692560 "./pocs/poc2", ln=ln@entry=0x5c) at abcparse.c:179
#7 0x000000000041fa17 in txt_add_eos (fname=fname@entry=0x692560 "./pocs/poc2", linenum=linenum@entry=0x5c) at front.c:379
#8 0x0000000000420478 in frontend (
s=0x694194 "\n%%vskip 1cm\n%%textfont Times-Rntext\nSummary of changes:\n\n- Bass and alto clefs.\n- Vocals.\n- In-line info fields can be cod- Subtitles now printed without "or:".\n- Can be more than one composer field."...,
s@entry=0x6937a0 "%%textfont Helvetica-Bold 21\n%%center Examples for new features in abc2ps-1.2.5\n%%textfont * 16\n%%cent\261r Oct. 5 1997\n%%textfont Times-Roman 16\n\nH:1\nT:Scale with Treble Clef\nM:C\n%%freegchord 1\t% abcm2p"..., ftype=ftype@entry=0x0, fname=fname@entry=0x692560 "./pocs/poc2", linenum=, linenum@entry=0x0) at front.c:891
#9 0x0000000000403fdd in treat_file (fn=0x7fffffffe78c "./pocs/poc2", ext=) at abcm2ps.c:240
#10 0x0000000000403118 in main (argc=0x0, argc@entry=0x2, argv=, argv@entry=0x7fffffffe508) at abcm2ps.c:1041
#11 0x00007ffff7724840 in __libc_start_main (main=0x4029e0

, argc=0x2, argv=0x7fffffffe508, init=, fini=, rtld_fini=, stack_end=0x7fffffffe4f8)
at ../csu/libc-start.c:291
#12 0x0000000000403689 in _start ()
poc2.zip

@moinejf
Copy link
Collaborator

moinejf commented Jul 25, 2020

Fixed by commit #83c0bb3. Thanks.

moinejf added a commit that referenced this issue Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants