Skip to content

Startup crash: Bad memory access in CPUDetectClass::Init_Compact_Log #437

Closed
@JAJames

Description

@JAJames

Area(s) with this issue?

No response

Describe the issue

Init_Compact_Log doesn't zero-initialize the os_info object, and Get_OS_Info isn't guaranteed to initialize all of the members either. This is causing a startup crash, especially on the VS2022 branch, whenever os_info.Code happens to pick up non-zero garbage data.

This ticket is to fix that by always initializing the values in Get_OS_Info, instead.

Will open a PR for this shortly.

Steps to reproduce

  1. Startup game
  2. Be unlucky
  3. Observe crash
  4. If you have a debugger attached, observe the crash occurring when calling COMPACTLOG below.

Attachments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working rightCriticalSeverity: Minor < Major < Critical < Blocker

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions