same issue happens in both Linux and Win32.
~/mozjpeg$ gdb --args ./jpegtran -verbose -optimize -outfile 2.jpg.new e52e7a1c-a9e4-11e3-92e5-4043847afcf0.jpg
GNU gdb (GDB) CentOS (7.0.1-45.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/mozjpeg/jpegtran...done.
(gdb) r
Starting program: /root/mozjpeg/jpegtran -verbose -optimize -outfile 2.jpg.new e52e7a1c-a9e4-11e3-92e5-4043847afcf0.jpg
libmozjpeg version 1.0.0 (build 20140312)
Copyright (C) 1991-2012 Thomas G. Lane, Guido Vollbeding
Copyright (C) 1999-2006 MIYASAKA Masaru
Copyright (C) 2009 Pierre Ossman for Cendio AB
Copyright (C) 2009-2013 D. R. Commander
Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)
Emulating The Independent JPEG Group's software, version 6b 27-Mar-1998
Start of Image
Define Quantization Table 0 precision 0
Start Of Frame 0xc2: width=2001, height=1250, components=4
Component 67: 1hx1v q=0
Component 77: 1hx1v q=0
Component 89: 1hx1v q=0
Component 75: 1hx1v q=0
Define Huffman Table 0x00
Start Of Scan: 4 components
Component 67: dc=0 ac=0
Component 77: dc=0 ac=0
Component 89: dc=0 ac=0
Component 75: dc=0 ac=0
Ss=0, Se=0, Ah=0, Al=0
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 67: dc=0 ac=0
Ss=1, Se=8, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 77: dc=0 ac=0
Ss=1, Se=8, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 89: dc=0 ac=0
Ss=1, Se=8, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 75: dc=0 ac=0
Ss=1, Se=8, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 67: dc=0 ac=0
Ss=9, Se=63, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 77: dc=0 ac=0
Ss=9, Se=63, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 89: dc=0 ac=0
Ss=9, Se=63, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 75: dc=0 ac=0
Ss=9, Se=63, Ah=0, Al=2
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 67: dc=0 ac=0
Ss=1, Se=63, Ah=2, Al=1
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 77: dc=0 ac=0
Ss=1, Se=63, Ah=2, Al=1
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 89: dc=0 ac=0
Ss=1, Se=63, Ah=2, Al=1
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 75: dc=0 ac=0
Ss=1, Se=63, Ah=2, Al=1
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 67: dc=0 ac=0
Ss=1, Se=63, Ah=1, Al=0
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 77: dc=0 ac=0
Ss=1, Se=63, Ah=1, Al=0
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 89: dc=0 ac=0
Ss=1, Se=63, Ah=1, Al=0
Define Huffman Table 0x10
Start Of Scan: 1 components
Component 75: dc=0 ac=0
Ss=1, Se=63, Ah=1, Al=0
End Of Image
Program received signal SIGSEGV, Segmentation fault.
0x0806a79b in copy_buffer (cinfo=0xbffff628, scan_idx=-452701905) at jcmaster.c:576
576 unsigned long size = master->scan_size[scan_idx];
(gdb) p *master
$1 = {pub = {prepare_for_pass = 0x806a3d9 <prepare_for_pass>, pass_startup = 0x806a741 <pass_startup>, finish_pass = 0x806b301 <finish_pass_master>, call_pass_startup = 0, is_last_pass = 1},
pass_type = huff_opt_pass, pass_number = 33, total_passes = 34, scan_number = 16, scan_buffer = {0x80a0b88 "\377", <incomplete sequence \333>, 0x8094b78 "\377", <incomplete sequence \304>,
0x809ab88 "\377", <incomplete sequence \304>, 0x80b0b90 "\377", <incomplete sequence \304>, 0x80c0ba8 "\377", <incomplete sequence \304>, 0x80d0bb0 "\377", <incomplete sequence \304>,
0x80b4b98 "\377", <incomplete sequence \304>, 0x80b8ba0 "\377", <incomplete sequence \304>, 0x80ecbc8 "\377", <incomplete sequence \304>, 0x80fcbd0 "\377", <incomplete sequence \304>,
0x80e4bc0 "\377", <incomplete sequence \304>, 0x810cbd8 "\377", <incomplete sequence \304>, 0x8114be0 "\377", <incomplete sequence \304>, 0x8124bf0 "\377", <incomplete sequence \304>, 0x0,
0x0, 0x0, 0xf8ec179e <Address 0xf8ec179e out of bounds>, 0x76e647a1 <Address 0x76e647a1 out of bounds>, 0x372fbef9 <Address 0x372fbef9 out of bounds>,
0x5446f6e9 <Address 0x5446f6e9 out of bounds>, 0xba4e5bbe <Address 0xba4e5bbe out of bounds>, 0x96c074fa <Address 0x96c074fa out of bounds>, 0xfa52ca08 <Address 0xfa52ca08 out of bounds>,
0x857ed0af <Address 0x857ed0af out of bounds>, 0x7afafae6 <Address 0x7afafae6 out of bounds>, 0x8c6304b5 <Address 0x8c6304b5 out of bounds>, 0xf8c2cbfc <Address 0xf8c2cbfc out of bounds>,
0xc359431f <Address 0xc359431f out of bounds>, 0x3133bcc5 <Address 0x3133bcc5 out of bounds>, 0x2d000092 <Address 0x2d000092 out of bounds>, 0xbe39edac <Address 0xbe39edac out of bounds>,
0xcdfded8f <Address 0xcdfded8f out of bounds>, 0xb282cc14 <Address 0xb282cc14 out of bounds>, 0x86b6bfbe <Address 0x86b6bfbe out of bounds>, 0x79769ba2 <Address 0x79769ba2 out of bounds>,
0xfad6c3ec <Address 0xfad6c3ec out of bounds>, 0x4a5e473f <Address 0x4a5e473f out of bounds>, 0x3c104066 <Address 0x3c104066 out of bounds>, 0x37f3987f <Address 0x37f3987f out of bounds>,
0xcbe6a2de <Address 0xcbe6a2de out of bounds>, 0xea6f19ed <Address 0xea6f19ed out of bounds>, 0x4eeb75ca <Address 0x4eeb75ca out of bounds>, 0x9f4309bd <Address 0x9f4309bd out of bounds>,
0x382a3a0d <Address 0x382a3a0d out of bounds>, 0xa3677cf5 <Address 0xa3677cf5 out of bounds>, 0xeab4ba27 <Address 0xeab4ba27 out of bounds>, 0xe639f6eb <Address 0xe639f6eb out of bounds>,
0x996510ca <Address 0x996510ca out of bounds>, 0x81cc396 <Address 0x81cc396 out of bounds>, 0x80c4 <Address 0x80c4 out of bounds>, 0x0, 0x0, 0x0, 0x0, 0x0,
0xbc262708 <Address 0xbc262708 out of bounds>, 0xf2715758 <Address 0xf2715758 out of bounds>, 0x3dfd6df8 <Address 0x3dfd6df8 out of bounds>, 0xecec3c7f <Address 0xecec3c7f out of bounds>,
0xcd9ed1ec <Address 0xcd9ed1ec out of bounds>, 0xe12cb391 <Address 0xe12cb391 out of bounds>, 0x38460020 <Address 0x38460020 out of bounds>, 0x26c3ebb4 <Address 0x26c3ebb4 out of bounds>},
scan_size = {52143, 15594, 11285, 14558, 34778, 34435, 12556, 16105, 34925, 36719, 20999, 26056, 30513, 36719, 251658384, 4081655505, 674001968, 4242353149, 1272850508, 533353962, 108,
16777216, 784332148, 2163761075, 0, 0, 0, 0, 0, 1445003264, 2582576883, 10108645, 0, 3709582596, 3752415228, 2043257159, 4221079371, 3129618532, 1870583133, 4260950473, 3802721146, 76748896,
1777693943, 2127601658, 605284231, 2762842978, 2313157048, 2360473329, 1691094123, 957547648, 4138784573, 4002348564, 2533590259, 2259327899, 1588042658, 4208305969, 549799727, 4286062592,
1038557952, 922004303, 1280073343, 1361887723, 2591713950, 2391674538}, best_cost = 69213, best_freq_split_idx_luma = 1921132695, best_freq_split_idx_chroma = 0, best_Al_luma = 159409110,
best_Al_chroma = 0, interleave_chroma_dc = 0, saved_dest = 0x808c220}
(gdb) bt
#0 0x0806a79b in copy_buffer (cinfo=0xbffff628, scan_idx=-452701905) at jcmaster.c:576
#1 0x0806b084 in select_scans (cinfo=0xbffff628, next_scan_number=14) at jcmaster.c:731
#2 0x0806b3db in finish_pass_master (cinfo=0xbffff628) at jcmaster.c:810
#3 0x0804dd15 in jpeg_finish_compress (cinfo=0xbffff628) at jcapimin.c:186
#4 0x08049a5c in main (argc=6, argv=0xbffffa54) at jpegtran.c:585
(gdb)