Bug 190539 - pbmtext crashes on x86-64
Summary: pbmtext crashes on x86-64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: netpbm
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jindrich Novy
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: 176344 FAST4.5APPROVED
TreeView+ depends on / blocked
 
Reported: 2006-05-03 13:19 UTC by Bastien Nocera
Modified: 2013-07-02 23:15 UTC (History)
3 users (show)

Fixed In Version: RHBA-2006-0651
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-11 19:14:32 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0651 0 normal SHIPPED_LIVE netpbm bug fix update 2007-05-01 14:12:17 UTC

Description Bastien Nocera 2006-05-03 13:19:56 UTC
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 09:42:49 UTC
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 19:14:34 UTC
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.