Skip to content

Memory Leak (?) while compiling #339

@aaroncox

Description

@aaroncox

The build times on one of my API (readonly) contracts recently has increased by 25x.

I have reproduced the issue in a more simple contract, which can be found here:

https://github.com/aaroncox/cdt-leak-contract

Running make will trigger the build, which takes ~3 minutes to complete on a XeonW w/ 128gb of RAM. During the build memory usage of clang-9 peaks at ~20 GB, which I assume is the cause of the slowdown.

Is this to be expected when importing these system headers, or is there some kind of memory leak occurring during the build that's causing this runaway resource usage?

I am leaning towards a bug causing a memory leak, since this one change seems to resolve the issue for some reason:

https://github.com/aaroncox/cdt-leak-contract/pull/2/files

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions