core dump after strarr.out.map(lambda("l:strsplit(l,/ex)"))

21 views
Skip to first unread message

markus.sc...@gmail.com

unread,
Feb 29, 2024, 9:06:20 AM2/29/24
to idl-pvwave
I experienced an unexplained core dump, does anyone know what the problem is? Here is the terminal extract of a minimal example:

IDL> !version
{
    "ARCH": "x86_64",
    "OS": "linux",
    "OS_FAMILY": "unix",
    "OS_NAME": "linux",
    "RELEASE": "8.5",
    "BUILD_DATE": "Jul  7 2015",
    "MEMORY_BITS": 64,
    "FILE_OFFSET_BITS": 64
}
IDL> out=['357 1780 translate','1887 1780 translate','357 250 translate','1887 250 translate']
IDL> strsplit(out,/ex)
[
    ["357", "1780", "translate"],
    ["1887", "1780", "translate"],
    ["357", "250", "translate"],
    ["1887", "250", "translate"]
]
IDL> out.map(lambda("l:strsplit(l,/ex)"))
357 250 translate
1887 250 357late
357 250 translate
1887 \u042c \u042clate
free(): double free detected in tcache 2
Aborted (core dumped)

Chris Torrence

unread,
Feb 29, 2024, 12:28:14 PM2/29/24
to idl-pvwave
Seems like a bug in lambda, or the map function. I tried this code in both IDL 8.7.2 (Mac Intel) and IDL 9.0 (Mac ARM) and it worked fine:

IDL> !version

{

    "ARCH": "arm64",

    "OS": "darwin",

    "OS_FAMILY": "unix",

    "OS_NAME": "Mac OS X",

    "RELEASE": "9.0.0",

    "BUILD_DATE": "Oct 27 2023 (461719)",

    "MEMORY_BITS": 64,

    "FILE_OFFSET_BITS": 64

}


I don't remember this particular bug, but I'm guessing it was fixed in the intervening years. All platforms share the same codebase (with minor diffs) so if it works on Mac, I'm confident it will work on Linux. So I'd recommend upgrading to IDL 8.7.2 or higher.

Cheers,
Chris
NV5 Geospatial
Reply all
Reply to author
Forward
0 new messages