[Vm-dev] [CRASH] I am getting a segmentation fault calling my primitive

Robert Withers robert.withers at pm.me
Sat May 29 19:29:50 UTC 2021


I commented out these argument checks and regenerated and rebuilt the plugins. New plugins are attached.

Now the RSErasureGaloisWithPlugin is working, for the following squeak calls.

> RSErasureGalois newGalois... a RSErasureGaloisWithPlugin

> self addOrSubtract: 2 by: 1. = 3
> self divide: 4 by: 2. = 14
> self exp: 3. = 8
> self exp: 2 power: 2. = 4
> self log: 4. = 2
> self galoisMultiply: 2 by: 2. = 4
> self tableMultiply: 2 by: 2. = 4

I still have problems with the RSFECPlugin, calling methods in RSFECGenericGFWithPlugin:

> RSFECGenericGF newPrimitive: 16r012D size: 256 generatorBase: 1... a RSFECGenericGFWithPlugin

> self addOrSubtract: 2 by: 1. = 3
> self exp: 3. {#primitiveFailed}
> self inverse: 2. = 0
> self log: 4. {#primitiveFailed}
> self multiply: 2 by: 2. {#primitiveFailed}

---
Kindly,
Robert

On 5/29/21 2:49 PM, Robert Withers wrote:

> Could the issue be bounds checking in the primitive? But it is a seg-fault, not a #primitiveFailed. Thanks for any and all help! This one has me stumped.
>
>> ((interpreterProxy isBytes: a)
>> and: [ (interpreterProxy stSizeOf: a) = 4 ])
>> ifFalse: [ ^interpreterProxy primitiveFailFor: PrimErrBadArgument ].
>> ((interpreterProxy isBytes: b)
>> and: [ (interpreterProxy stSizeOf: b) = 4 ])
>> ifFalse: [ ^interpreterProxy primitiveFailFor: PrimErrBadArgument ].
>
> ---
> Kindly,
> Robert
>
> On 5/29/21 2:42 PM, Robert Withers wrote:
>
>> Here is the RSErasurePlugin.so & RSFECPlugin.so so folks may be able to help me test the seg-fault with these plugin and loading the latest RSErasure code:
>>
>>> Installer ss
>>> project: 'Cryptography';
>>> install: 'ProCrypto-1-1-1';
>>> install: 'ProCryptoTests-1-1-1'.
>>
>> Here is the code I run that leads to the seg-fault:
>>
>>> RSErasureGalois newGalois.
>>
>> ---
>> Kindly,
>> Robert
>>
>> On 5/29/21 2:37 PM, Robert Withers wrote:
>>
>>> Hey y'all,
>>>
>>> I am getting a segmentation fault calling primitiveGaloisMultiplyBy in
>>> my RSErasurePlugin. I have attached the crash.dmp file.
>>> Investigating...assistance requested. Grazie!!
>>>
>>> --
>>> ---
>>> Kindly,
>>> Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210529/5012cee4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RSErasurePlugin.so
Type: application/octet-stream
Size: 27528 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210529/5012cee4/attachment-0002.so>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RSFECPlugin.so
Type: application/octet-stream
Size: 27264 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20210529/5012cee4/attachment-0003.so>


More information about the Vm-dev mailing list