Bug 190539 - pbmtext crashes on x86-64
pbmtext crashes on x86-64
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: netpbm (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Ben Levenson
:
Depends On:
Blocks: 176344 FAST4.5APPROVED
  Show dependency treegraph
 
Reported: 2006-05-03 09:19 EDT by Bastien Nocera
Modified: 2013-07-02 19:15 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2006-0651
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-11 15:14:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix the pbmtext breakage backported from upstream. (3.55 KB, patch)
2006-05-09 05:42 EDT, Jindrich Novy
no flags Details | Diff

  None (edit)
Description Bastien Nocera 2006-05-03 09:19:56 EDT
netpbm-progs-10.25-2.EL4.3

1. run "pbmtext hello" on an x86-64
2. See the crash

Backtrace:
#0  pbm_writepbmrow (fileP=0x2a95b488c0, bitrow=0x504440 "", cols=51,
   forceplain=Variable "forceplain" is not available.
) at libpbm3.c:85
#1  0x0000002a957fd48a in pbm_writepbm (fileP=0x2a95b488c0, bits=0x504348,
   cols=51, rows=29, forceplain=0) at libpbm3.c:259
#2  0x0000000000401968 in main (argc=2, argv=Variable "argv" is not available.
) at pbmtext.c:719

Crashes in:
       packedBits[col/8]
         = bitreverse [ ~ (unsigned char) __builtin_ia32_pmovmskb (
           __builtin_ia32_pcmpeqb ( *(v8qi*) (&bitrow[col]), *(v8qi*) zero64)
           ) ];

A patch that fixes the crash in itself, but creates horribly broken images:
--- netpbm-10.25/lib/libpbm3.c.old      2006-04-21 09:08:42.000000000 +0100
+++ netpbm-10.25/lib/libpbm3.c  2006-05-03 15:14:32.000000000 +0100
@@ -84,7 +84,7 @@ packBitsWithMmxSse(FILE *          const
    for (col =0; col < cols-7; col += 8)
        packedBits[col/8]
          = bitreverse [ ~ (unsigned char) __builtin_ia32_pmovmskb (
-            __builtin_ia32_pcmpeqb ( *(v8qi*) (&bitrow[col]), *(v8qi*) zero64)
+            __builtin_ia32_pcmpeqb ( *(v8qi*) (&bitrow[col]), (v8qi) zero64)
            ) ];

    *nextColP = col;

Easiest might be to disable SSE/MMX functions on x86-64 systems.
Comment 1 Jindrich Novy 2006-05-09 05:42:49 EDT
Created attachment 128773 [details]
Patch to fix the pbmtext breakage backported from upstream.

The code in 10.25 is broken despite the missing '&' in the original netpbm. The
attached patch fixes it, so it also produces sane images. (backported from
netpbm-10.33)
Comment 9 Red Hat Bugzilla 2006-10-11 15:14:34 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0651.html

Note You need to log in before you can comment on or make changes to this bug.