POSIX mq_receive NULL Priority

Vincent Galbo vgalbo at aeronix.com
Mon Mar 18 15:34:58 UTC 2013


Hello,

 

I am not sure if this bug is common knowledge or not, but I figured I would
report my findings. 

 

I am working with RTEMS-4.10-1.2.7 on a UT699 LEON3. I received my RTEMS
source from http://www.gaisler.com/anonftp/rcc/src/ .

 

I have been using the function mq_receive to pass messages between POSIX
threads (http://linux.die.net/man/3/mq_receive). Many manual pages explain
that the fourth parameter, *msg_prio, can be left NULL if you do not care
about the message priority. During some testing, I noticed that my mkprom2
boot loader was becoming corrupted. I determined that the mq_receive call
was overriding my memory location 0. This was due to passing NULL into the
priority parameter value. The mq_receive function must not check for NULL,
and places the priority of the received message into whatever memory
location is placed in the msg_prio parameter. My current work around is to
pass in a dummy variable for the priority parameter. 

 

Vincent Galbo

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130318/597e5722/attachment.html>


More information about the users mailing list