dd segfaults in some locales

Bug #73571 reported by Fredrik Arnerup
4
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: coreutils

dd (coreutils 5.93-5) segfaults after copying more than one byte if not using the "C" locale:

$ LC_ALL=C dd if=/dev/zero of=/dev/null bs=1024 count=16
16+0 records in
16+0 records out
16384 bytes (16 kB) copied, 3.5e-05 seconds, 468 MB/s

$ LC_ALL=en_US.UTF-8 dd if=/dev/zero of=/dev/null bs=1024 count=16
16+0 records in
16+0 records out
Segmentation fault

It might have something to do with UTF-8

It seems to do the job before it segfaults, though

Revision history for this message
Fredrik Arnerup (fredrik-arnerup) wrote :

Correction:
It only segfaults for me if I combine LC_ALL="??_??.UTF-8" with LANGUAGE=sv.

$ LC_ALL=en_US.UTF-8 LANGUAGE=sv dd if=/dev/zero of=/dev/null bs=1 count=2
2+0 records in
2+0 records out
Segmentation fault

$ LC_ALL=C LANGUAGE=sv dd if=/dev/zero of=/dev/null bs=1 count=2 2+0 records in
2+0 records out
2 bytes (2 B) copied, 2.3e-05 seconds, 87.0 kB/s

$ LC_ALL=en_US.UTF-8 LANGUAGE=en dd if=/dev/zero of=/dev/null bs=1 count=2
2+0 records in
2+0 records out
2 bytes (2 B) copied, 2.6e-05 seconds, 76.9 kB/s

Copying a single byte also works:

$ LC_ALL=en_US.UTF-8 LANGUAGE=sv dd if=/dev/zero of=/dev/null bs=1 count=1
1+0 records in
1+0 records out
1 byte (1 B) kopierad, 2.6e-05 sekunder, 38.5 kB/s

Revision history for this message
Laurent Bigonville (bigon) wrote :

What version do you use?

Changed in coreutils:
status: Unconfirmed → Needs Info
Revision history for this message
Fredrik Arnerup (fredrik-arnerup) wrote :

coreutils 5.93-5 (Ubuntu 6.06 LTS x86)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for coreutils (Ubuntu) because there has been no activity for 60 days.]

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.