[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64708] mxFree causes crash inside OMP paralle
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #64708] mxFree causes crash inside OMP parallel block |
Date: |
Fri, 22 Sep 2023 14:31:41 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?64708>
Summary: mxFree causes crash inside OMP parallel block
Group: GNU Octave
Submitter: None
Submitted: Fri 22 Sep 2023 06:31:39 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 8.3.0
Discussion Lock: Any
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 22 Sep 2023 06:31:39 PM UTC By: Anonymous
mxMalloc/mxFree cause a crash when used inside an OMP parallel block.
Replacing them with malloc/free works so it must be something to do with
_mex_context_, which I'm afraid goes above my pay grade to comprehend.
mxFree (void *ptr)
{
if (mex_context)
mex_context->free (ptr);
else
xfree (ptr);
}
I'm attaching a short demo code (TestFunc.cpp) and the output from compiling
and running it in Octave.
octave:1> mex TestFunc.cpp -fopenmp
octave:2> TestFunc(1)
1
octave:3> TestFunc(0)
fatal: caught signal fatal: caught signal fatal: caught signal fatal: caught
signal fatal: caught signal fatal: caught signal fatal: caught signal fatal:
caught signal Segmentation faultSegmentation fault -- stopping
myself...Segmentation fault -- stopping myself...
Segmentation faultfatal: caught signal Segmentation faultSegmentation fault --
stopping myself...
-- stopping myself...
Segmentation fault (core dumped)
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 22 Sep 2023 06:31:39 PM UTC Name: TestFunc.cpp Size: 550B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=55157>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64708>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64708] mxFree causes crash inside OMP parallel block,
anonymous <=