#36 closed defect (fixed)
report of MP bug in objectget.c
Reported by: | Joel Sherrill | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | low | Milestone: | 2 |
Component: | score | Version: | 4.5 |
Severity: | major | Keywords: | |
Cc: | bugs@… | Blocked By: | |
Blocking: |
Description
Reported via direct email. I am reporting this so it will
not be only in my inbox. First email included a file with
mods but not much description. The second had this description.
========================================================
First, the comparison "if (information->maximum >= index)" sometimes (or
always?) succeeds for remote objects. And, in the original program, if that
comparison succeeds, you only check for local objects. So remote objects are
never found and an error is always returned. I fixed that by moving the
remote object check before this comparison. If a remote object is not found
(_Objects_MP_Is_remote() returned an error) only then I check for a local
object, by calling _Objects_Get_local_object(). Actually I think this
comparison is altogether unnecessary, because Objects_Get_local_object()
performs the same comparison internally, but I left it as is.
Second, the check for remote objects was incorrect. The original check
looked like that:
_Objects_MP_Is_remote(information,
_Objects_Build_id( information->the_class, Objects_Local_node, index), ...
So, you build a local id (by using Objects_Local_node) and then call
_Objects_MP_Is_remote() to check if that id is remote. This, obviously,
always returns an error. I replaced the entire _Objects_Build_id() call with
the original object id, which was passed as an argument to the
_Objects_Get() function. That seemed to work.
So, I think a fix is needed because this whole function didn't actually work
for remote objects. I haven't done much testing and I'm not very familiar
with RTEMS internals either, so it's possible that this is not a correct
fix. If you find anything that's wrong with it, please let me know.
========================================================
Release:
snapshots and probably RTEMS-4.5
Environment:
host and target NA
How-To-Repeat:
Read description.
Attachments (2)
Change History (2)
comment:1 Changed on 11/07/01 at 21:59:58 by Joel Sherrill
Status: | assigned → closed |
---|
Changed on 12/03/06 at 13:31:13 by Joel Sherrill
Attachment: | pr36_patches.tgz added |
---|
pr36_patches.tgz
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed and tested on both CVS trunk and 4.5 branch. Patches