You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/04/12 17:21:15 UTC

DO NOT REPLY [Bug 42101] New: - SSL SHM cache dies with bus errors on sparc when compiled with Sun CC

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42101>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42101

           Summary: SSL SHM cache dies with bus errors on sparc when
                    compiled with Sun CC
           Product: Apache httpd-2
           Version: 2.2.4
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_ssl
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: alex.kiernan@gmail.com


Using Sun CC (Sun C 5.8 Patch 121015-04 2007/01/10) using these options:

-fast -g -xs -v -xstrconst -xtarget=ultra3 -xarch=v8plusa

At line 1221 of ssl_scache_shmcb.c in Apache 2.2.24 we get a bus error. The 
problem is that given this struct:

typedef struct {
    time_t expires;
    unsigned int offset;
    unsigned char s_id2;
    unsigned char removed;
} SHMCBIndex;

Which is stored in shared memory at offset 0xfe42afba (the idx variable)

For the code:

(idx->s_id2 == id[1]) && !idx->removed

the compiler generates

ld       [%l2 + 8], %o0

(i.e. add 8 to %l2, dereference it and store the result in %o0)

in order to retrieve s_id2 and removed in one operation, only %l2 isn't 
naturally aligned so you get a bus error.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 42101] - SSL shmcb cache dies with bus errors on sparc when compiled with Sun CC

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42101>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42101


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|SSL SHM cache dies with bus |SSL shmcb cache dies with
                   |errors on sparc when        |bus errors on sparc when
                   |compiled with Sun CC        |compiled with Sun CC




------- Additional Comments From jorton@redhat.com  2007-04-24 02:59 -------
Nice work tracking this down, thanks.  It probably needs more _safe_ wrapper
functions to avoid this (if possible).

The trunk version of shmcb has been rewritten to avoid alignment issues; it
should be possible to drop this in as a replacement: any results from testing
very welcome:

http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c?revision=420983

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org