Skip to content

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Aug 24, 2024

gcc-15 detects use-after-free as:

lib/sound/openal_track.cpp: In function 'AUDIO_STREAM* sound_PlayStream(const char*, bool, float, const std::function<void(const AUDIO_STREAM*, const void*)>&, const void*)':
lib/sound/openal_track.cpp:1039:36: error: pointer used after 'void operator delete(void*, std::size_t)' [-Werror=use-after-free]
 1039 |                 alDeleteSources(1, &stream->source);
      |                                    ^~~~~~~~~~~~~~~
lib/sound/openal_track.cpp:1037:24: note: call to 'void operator delete(void*, std::size_t)' here
 1037 |                 delete stream;
      |                        ^~~~~~

`gcc-15` detects use-after-free as:

    lib/sound/openal_track.cpp: In function 'AUDIO_STREAM* sound_PlayStream(const char*, bool, float, const std::function<void(const AUDIO_STREAM*, const void*)>&, const void*)':
    lib/sound/openal_track.cpp:1039:36: error: pointer used after 'void operator delete(void*, std::size_t)' [-Werror=use-after-free]
     1039 |                 alDeleteSources(1, &stream->source);
          |                                    ^~~~~~~~~~~~~~~
    lib/sound/openal_track.cpp:1037:24: note: call to 'void operator delete(void*, std::size_t)' here
     1037 |                 delete stream;
          |                        ^~~~~~
@past-due past-due added this to the 4.5.3 milestone Aug 25, 2024
@past-due past-due merged commit eaacca9 into Warzone2100:master Aug 26, 2024
@trofi trofi deleted the gcc-15-build-fix branch August 26, 2024 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants