octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64687] mxMalloc thread safety and mxCreateNum


From: anonymous
Subject: [Octave-bug-tracker] [bug #64687] mxMalloc thread safety and mxCreateNumericArray performance
Date: Wed, 20 Sep 2023 17:51:44 -0400 (EDT)

Follow-up Comment #5, bug #64687 (project octave):

Thanks for your comment, John! Yes there is definitely a bug with
mxCreateNumericArray (and also mxCreateUnitNumericArray) with complex types.
It looks like the MX_HAS_INTERLEAVED_COMPLEX flag is not being taken into
account to double the size of the elements. 

Attached is TestFunc2.cpp compiled with *mex TestFunc2.cpp -R2018a* and tested
with *TestFunc2(3,3)*.


  octave:1> TestFunc2(3,3);
  Bytes required : 144
  Bytes allocated: 72
 
(0,0)(0,0)(0,0)(0,0)(0,2.61855e-322)(6.93935e-310,6.9394e-310)(0,0)(6.9394e-310,2.61855e-322)(0,6.9394e-310)
  fatal: caught signal Segmentation fault -- stopping myself...
  Segmentation fault (core dumped)


The other bug is mxMallox/mxFree which crash when used inside an omp parallel
block. Regular malloc/free work fine.

(file #55154)

    _______________________________________________________

Additional Item Attachment:

File name: TestFunc2.cpp                  Size:1 KB
    <https://file.savannah.gnu.org/file/TestFunc2.cpp?file_id=55154>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64687>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]