------- Comment #1 from dfranke at gcc dot gnu dot org 2007-07-09 15:08 ------- Confirmed. Presumely a buffer overflow in the library.
If len==8192, valgrind does not report any errors. If len > 8192: ===30988== Invalid write of size 1 ==30988== at 0x4022D8E: memcpy (mc_replace_strmem.c:406) ==30988== by 0x40A26C3: write_character (write.c:1412) ==30988== by 0x40A462B: _gfortrani_list_formatted_write (write.c:1533) ==30988== by 0x409A885: _gfortran_transfer_character (transfer.c:1416) ==30988== by 0x80486FB: MAIN__ (pr32702.f90:4) ==30988== by 0x8048748: main (fmain.c:22) ==30988== Address 0x4229340 is 0 bytes after a block of size 8,296 alloc'd ==30988== at 0x40213D0: malloc (vg_replace_malloc.c:149) ==30988== by 0x40342CC: _gfortrani_get_mem (memory.c:53) ==30988== by 0x40A0BE4: fd_to_stream (unix.c:1048) ==30988== by 0x409F509: _gfortrani_init_units (unit.c:525) ==30988== by 0x4033F73: init (main.c:152) ==30988== by 0x40307DC: (within /h/franke/packages/i686-pc-linux-gnu/gcc/lib/gcc/i686-pc-linux-gnu/4.3.0/libgfortran.so.3.0.0) ==30988== by 0x400D762: call_init (in /lib/ld-2.4.so) ==30988== by 0x400D872: _dl_init (in /lib/ld-2.4.so) ==30988== by 0x400087E: (within /lib/ld-2.4.so) Moving to libfortran, adding Jerry to CC. -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org, jvdelisle at gcc dot | |gnu dot org Component|fortran |libfortran http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32702