Skip to content

ccomp -dalloctrace writes traces from multiple input files to the same file #620

Open

Description

@haskiindahouse
$ echo 'extern int ga(void); int a(void) { return ga(); }' > a.c
$ echo 'extern int gb(void); int b(void) { return gb(); }' > b.c
$ ccomp -dalloctrace -S a.c b.c
$ ls *.alloctrace
a.alloctrace

a.alloctrace contains calls to both ga and gb. Compiling the files separately produces one trace per input. If b.alloctrace already exists, the combined invocation leaves its old contents in place.

I get the same result with -dall. Tested on 2685140 (aarch64-macos).

Activity

  1. xavierleroy commented on Nov 24, 2026

    @xavierleroy
    Contributor

    Is this really a problem for you? Most runs of a C compiler are for a single .c source file, and the various -d options are intended to be used by CompCert developers, not so much by end-users. As a CompCert developer, I'm not going to use -dalloctrace and multiple .c source files at the same time.

  2. haskiindahouse commented on Nov 24, 2026

    @haskiindahouse
    Author

    hi, not a big deal for me, i just try to modify compcert by myself and find this behavior... i dont find it strange, after re-reding, probably we can close it...

    thank you for comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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