Question w.r.t. crash inside select call from libbsd.

Karel Gardas karel at functional.vision
Tue Jan 31 13:17:53 UTC 2023


On 1/31/23 07:30, Sebastian Huber wrote:
>> so with zone being NULL the crash is expected here. However I'm still 
>> curious if this is libbsd issue or my issue with naive configuration?
> 
> Did you use select() before libbsd is initialized? Do you have more than 
> 64 file descriptors? In this case the fd set type is too small and you 
> have a stack overflow.

And this is exactly what was happening and why I increase STACK size 
insanely. Anyway, thanks to your help, this is no longer happening.

> Which branch of libbsd do you use? Maybe try out 
> the other branch as well.

master. I've thought this is were development happens, isn't it?

Also noted interesting thing. If I modify buildset to remove all USB, I 
still get linked error USB related (missing functions) due to functions 
being used from device-nexus.h. Is this current behavior or have I did 
anything wrong again?

E.g. stm32h7 USB setup in libbsd is wrong for my board (causes RTEMS 
crash) so I've tried to disable that by build set modification (all 
dev_usb* = off) and this does not helped hence I've modified 
device-nexus.h also to not use dwg at all.
Hmm, looks like patch like attach may solve the issue? At least it did 
for my case here. But I don't know if this is the right way to attack 
this issue.

>  From the 16MiB you already waste 4MiB for unused features if you use 
> the latest 6-freebsd-12 branch of libbsd.

No, master here. Also I've not attempted to optimize for size yet as the 
project is currently still not done yet.

Thanks!
Karel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwg.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230131/b2d8d9ce/attachment.bin>


More information about the devel mailing list