Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

attempting free on address which was not malloc()-ed #4279

Closed
wzdev-ci opened this issue Feb 4, 2015 · 8 comments
Closed

attempting free on address which was not malloc()-ed #4279

wzdev-ci opened this issue Feb 4, 2015 · 8 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Feb 4, 2015

resolution_invalid type_bug | by nsajko


Address Sanitizer reports faulty program memory handling:

==8158==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x000001fe6de0 in thread T0
    #0 0x7f321e0dd51f in __interceptor_free (/usr/lib/libasan.so.1+0x5751f)
    #1 0x7f321ca72171 in alDeleteSources (/usr/lib/libopenal.so.1+0x17171)
    #2 0x827b5b in sound_DestroyIteratedSample /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/lib/sound/openal_track.cpp:290
    #3 0x82891e in sound_Update() /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/lib/sound/openal_track.cpp:389
    #4 0x824e32 in audio_Update() /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/lib/sound/audio.cpp:613
    #5 0x803b91 in titleLoop() /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/src/wrappers.cpp:269
    #6 0x5fc154 in runTitleLoop /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/src/main.cpp:939
    #7 0x5fc154 in mainLoop() /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/src/main.cpp:1011
    #8 0x94a63c in wzMain3() /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/lib/sdl/main_sdl.cpp:1304
    #9 0x5fdd33 in realmain(int, char**) /home/nsajko/build/warzone2100/src/warzone2100-3.1.2/src/main.cpp:1342
    #10 0x7f321a2fc03f in __libc_start_main (/usr/lib/libc.so.6+0x2003f)
    #11 0x46a891 (/usr/bin/warzone2100+0x46a891)
AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: bad-free ??:0 __interceptor_free
==8158==ABORTING

Issue migrated from trac:4279 at 2022-04-16 11:49:24 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2015

nsajko changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2015

nsajko changed _comment1 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2015

nsajko commented


This happens when any option on the main menu (the first one you see when you start the game up) is clicked on. When I use the 'Check for a newer version' button, or the other options which open a web page, the browser and web page are launched successfully (so that bit of code is presumably before the faulty one).

Also, I probably should have mentioned that ASan works by replacing free() and checking its usage.

@wzdev-ci
Copy link
Contributor Author

vexed changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

vexed changed resolution from `` to invalid

@wzdev-ci
Copy link
Contributor Author

vexed changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

vexed changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

vexed commented


sound   |20:47:23: [sound_InitLibrary:163] Current audio device: Generic Software
sound   |20:47:23: [sound_InitLibrary:187] OpenAL Vendor: Creative Labs Inc.
sound   |20:47:23: [sound_InitLibrary:191] OpenAL Version: 1.1
sound   |20:47:23: [sound_InitLibrary:195] OpenAL Renderer: Software
sound   |20:47:23: [sound_InitLibrary:199] OpenAL Extensions: EAX EAX2.0 EAX3.0 EAX4.0 EAX5.0 EAX3.0EMULATED EAX4.0EMULATED AL_EXT_OFFSET AL_EXT_LINEAR_DISTANCE AL_EXT_EXPONENT_DISTANCE
sound   |20:47:23: [PlayList_Read:126] Added song track1.ogg to playlist
sound   |20:47:23: [PlayList_Read:126] Added song track2.ogg to playlist
sound   |20:47:23: [PlayList_Read:126] Added song track3.ogg to playlist
sound   |20:47:23: [cdAudio_Open:51] called(music)
sound   |20:47:24: [cdAudio_PlayTrack:129] called(0)
sound   |20:47:24: [cdAudio_OpenTrack:78] called(music/menu.ogg)
sound   |20:47:24: [cdAudio_Stop:157] called, cdStream=00000000
sound   |20:47:24: [cdAudio_OpenTrack:100] successful(music/menu.ogg)
(window open sound)
sound   |20:47:24: [audio_PlayTrack:959] Allocated sample 0B2E5F90
sound   |20:47:29: [sound_Play2DSample:652] alGenSources for sample 0B2E5F90 source c28e6e0
sound   |20:47:29: [sound_AddActiveSample:581] Allocated (active copy) sample 0B2E6370
sound   |20:47:29: [sound_DestroyIteratedSample:271] alDeleteSources sample 0B2E6370, source c28e6e0
sound   |20:47:33: [sound_DestroyIteratedSample:282] deallocate sample 0B2E6370
sound   |20:47:33: [audio_Update:579] Done with sample 0B2E5F90, free()
(mouse over 'button' sound)
sound   |20:47:36: [audio_PlayTrack:959] Allocated sample 0B2E5F90
sound   |20:47:36: [sound_Play2DSample:652] alGenSources for sample 0B2E5F90 source c28e6e0
sound   |20:47:36: [sound_AddActiveSample:581] Allocated (active copy) sample 089EC350
sound   |20:47:36: [sound_DestroyIteratedSample:271] alDeleteSources sample 089EC350, source c28e6e0
sound   |20:47:36: [sound_DestroyIteratedSample:282] deallocate sample 089EC350
sound   |20:47:36: [audio_Update:579] Done with sample 0B2E5F90, free()
(clicked on 'button' sound)
sound   |20:47:37: [audio_PlayTrack:959] Allocated sample 0B2E5F90
sound   |20:47:37: [sound_Play2DSample:652] alGenSources for sample 0B2E5F90 source c28e6e0
sound   |20:47:37: [sound_AddActiveSample:581] Allocated (active copy) sample 08A168A8
sound   |20:47:37: [sound_DestroyIteratedSample:271] alDeleteSources sample 08A168A8, source c28e6e0
sound   |20:47:37: [sound_DestroyIteratedSample:282] deallocate sample 08A168A8
sound   |20:47:37: [audio_Update:579] Done with sample 0B2E5F90, free()

sound   |20:47:38: [cdAudio_Close:61] called
sound   |20:47:38: [cdAudio_Stop:157] called, cdStream=0B315070
sound   |20:47:38: [sound_ShutdownLibrary:227] starting shutdown
sound   |20:47:38: [sound_ShutdownLibrary:239] make default context NULL
sound   |20:47:38: [sound_ShutdownLibrary:243] destroy previous context
sound   |20:47:38: [sound_ShutdownLibrary:247] close device

All looks fine here.
Perhaps it is your openALsoft that has the issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant