Skip to content

Tests fail with -ftrivial-auto-var-init=pattern compiler flag enabled #827

Open
@risicle

Description

@risicle

(In NixOS we use a wrapped compiler that can inject e.g. our hardening flags)

If we enable the -ftrivial-auto-var-init=pattern hardening flag when building flac 1.5.0, the tests fail with:

testing FLAC__stream_decoder_find_total_samples... Number of samples returned is 0... FAILED, returned wrong number of samples, state = 0 (FLAC__STREAM_DECODER_SEARCH_FOR_METADATA)

This suggests something somewhere (hopefully just the test harness) might be using uninitialized variables.

This is on aarch64-linux with GCC 14.2.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions