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 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2323
Closed
Open
Created Jan 20, 2023 by Sven-Bodo Scholz@sbsOwner

mem:LRO bug; aliasing in recursive loop call has been overlooked

When compiling

int main()
{
    def_chunk = with {} : genarray ([20], 0);

    aa = def_chunk;
    bb = def_chunk;

    b,c = with {
            ( . <= iv < .) {
                aa = def_chunk;
                bb = def_chunk;
                for (i=0; _lt_SxS_(i,4); i = _add_SxS_(i,1)) {
                    bb = with {
                           ([2] <= ov <[19]) : _sel_VxA_(ov, aa) ;
                         } : modarray (bb);
                    tmp = aa;
                    aa = bb;
                    bb = tmp;
                }
            } : (aa, bb);
          } : (genarray ([2], def_chunk),
               genarray ([2], def_chunk));

    return _sel_VxA_([0,0], b);
}

with

sac2c 1.3.3-MijasCosta-1036-g3a2ed
build-type: RELEASE
built-by: "sbs" at 2023-01-18T10:04:41

even when using -noemrl -noEMRCI -noEMRCF produces

-sbs-SvenBodosAir2-> ./a.out
a.out(18695,0x7ff84562d8c0) malloc: *** error for object 0x600003178000: pointer being freed was not allocated
a.out(18695,0x7ff84562d8c0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort
Edited Jan 22, 2023 by Sven-Bodo Scholz
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking