Skip to contentSkip to conversation

: aoss crashes (patch)

ALSA - liboss 0000494 [email protected] 1 participant 1 message Sep 13, 2004

lore
Share & tools
lore
#0 lore raw

The following bug has been RESOLVED.
======================================================================
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000494
======================================================================

Reported By:                stsp
Assigned To:                tiwai
======================================================================
Project:                    ALSA - liboss
Bug ID:                     494
Category:                   
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
======================================================================
Date Submitted:             09-09-2004 20:46 CEST
Last Modified:              09-13-2004 18:08 CEST

======================================================================
Summary: aoss crashes (patch)
Description:
aoss always causes a SIGSEGV for me. Here is a
stack trace:
---
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000000 0x00000000 in ?? ()
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000001 0x4002a76d in fopen (path=0x40039c3a "/proc/mounts", mode=0x40039c38 "r")

    at alsa-oss.c:661
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000002  0x40036d4d in print_access_vector () from /lib/libselinux.so.1
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000003  0x40038971 in setfscreatecon () from /lib/libselinux.so.1
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000004  0x4002fc55 in _init () from /lib/libselinux.so.1
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000005  0x4000bf71 in _dl_init_internal () from /lib/ld-linux.so.2
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000006  0x400007f5 in _dl_start_user () from /lib/ld-linux.so.2

---
======================================================================

----------------------------------------------------------------------
tiwai - 09-13-2004 15:49 CEST
----------------------------------------------------------------------
Could you give the patch summary and signed-off-by line to apply your patch (preferably with detailed description).

It looks like below.

Summary: [ALSA-OSS] Fix segfault at fopen

This patch fixes the bug....
More description...

----------------------------------------------------------------------
stsp - 09-13-2004 18:01 CEST
----------------------------------------------------------------------
Hmm, OK. Thanks for the hint.
Lets try that:

-----------

Summary: [ALSA-OSS] Always initialize pointers before use

Description:
This patch makes sure that the initialize() is always called before any pointer to function is used. Somehow it happens that the __attribute__((constructor)) is not always sufficient - other libs may have that attribute either, and may call fopen() from within their constructors, which leads to a SIGSEGV, that this patch fixes. Perhaps the __attribute__((constructor)) is no longer needed with that patch at all.

----------------------------------------------------------------------
tiwai - 09-13-2004 18:08 CEST
----------------------------------------------------------------------
Perfect :)

Now applied to CVS. Thanks for the patch.

Bug History
Date Modified Username Field Change
======================================================================

09-09-04 20:46 stsp           New Bug                                      
09-09-04 20:46 stsp           File Added: alsa-oss.c.diff                    
09-13-04 15:49 tiwai          Bugnote Added: 0001749                       
09-13-04 18:01 stsp           Bugnote Added: 0001751                       
09-13-04 18:02 stsp           File Added: aoss_init_fix.diff                    
09-13-04 18:08 tiwai          Bugnote Added: 0001752                       
09-13-04 18:08 tiwai          Assigned To               => tiwai           
09-13-04 18:08 tiwai          Resolution               open => fixed       
09-13-04 18:08 tiwai          Status                   new => resolved     

======================================================================

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php