iconv crashed with SIGSEGV in fwrite() with option "-o directory"

Bug #330020 reported by Per Ångström
6
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: libc6

I tried to use iconv to convert a file by giving a directory name for -o, hoping that iconv would be smart enough to create an output file in the output directory with the same name as the input file. Instead, iconv crashed.

How to reproduce:
1) mkdir iconv-output
2) echo test > iconv-in.txt
3) iconv -f iso88591 -t utf8 -o iconv-output iconv-in.txt

Actual result: iconv crashes.
Expected result: iconv should either produce an error message or create "iconv-output/iconv-in.txt".

ProblemType: Crash
Architecture: amd64
Dependencies:
 libgcc1 1:4.3.3-3ubuntu5
 gcc-4.3-base 4.3.3-3ubuntu5
 findutils 4.4.0-2ubuntu3
 libc6 2.9-0ubuntu10
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/iconv
Package: libc6 2.9-0ubuntu10
ProcCmdline: iconv -f iso88591 -t utf8 Om_per_angstrom.rb -o rusex
Signal: 11
SourcePackage: glibc
StacktraceTop:
 fwrite () from /lib/libc.so.6
 ?? ()
 ?? ()
 ?? ()
 __libc_start_main () from /lib/libc.so.6
Title: iconv crashed with SIGSEGV in fwrite()
Uname: Linux 2.6.28-7-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Per Ångström (autark) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:fwrite () from /lib/libc.so.6
write_output ()
process_block ()
main ()

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Changed in glibc:
importance: Undecided → Medium
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Yep, easily repeated (Intrepid 64bit).

Changed in glibc:
status: New → Confirmed
Revision history for this message
Per Ångström (autark) wrote :

No improvement in glibc-2.10-1.

Revision history for this message
Per Ångström (autark) wrote :

Works for me in Ubuntu 10.10 RC1, iconv (Ubuntu EGLIBC 2.12.1-0ubuntu6) 2.12.1.

pang@barbara:~$ iconv -f iso88591 -t utf8 -o iconv-output iconv-in.txt
iconv: cannot open output file: Is a directory

Changed in glibc (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.