Bug 7610 - Segmentation fault using substring at 64 bits
Summary: Segmentation fault using substring at 64 bits
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.21.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 20:36 UTC by Fernando Muñoz
Modified: 2014-11-17 20:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Muñoz 2014-11-06 20:36:57 UTC
Following code crashes busybox:

busybox sh -c 'export z=abcdefg;echo ${z:0:9223372036854775807}'

(gdb) run  sh -c 'export z=abcdefg;echo ${z:0:9223372036854775807}'
Starting program: /bin/busybox sh -c 'export z=abcdefg;echo ${z:0:9223372036854775807}'

Program received signal SIGSEGV, Segmentation fault.
0x0000000000422287 in ?? ()

Crash only appears at 64 bits, 32 bits generates no crash.
Comment 1 Denys Vlasenko 2014-11-17 20:10:00 UTC
Can't reproduce. Possibly fixed in recent commits.