Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 393
    • Issues 393
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2487
Closed
Open
Created May 15, 2025 by Thomas Koopman@thomasDeveloper

cti header formats memory leak

Both CTFinitialize and GLOBinitializeGlobal set

global.cti_primary_header_format = STRcpy (CTF_DEFAULT_FIRST_LINE_HEADER); and global.cti_continuation_header_format = STRcpy (CTF_DEFAULT_MULTI_LINE_HEADER);

static node *
SetupCompiler (int argc, char *argv[], tool_t tool, char *toolname)
{
    DBUG_ENTER ();
    ...
    CTFinitialize ();
    ...
    GLOBinitializeGlobal (argc, argv, tool, toolname);
    ...

This creates a memory leak. I think we just move CTFinitialize to after the global initalisation.

Also

    ARGS_OPTION ("cti-primary-header-format", global.cti_primary_header_format = STRcpy (ARG));

in options.c looks shady. Should we not optionally free first?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking