[Bug 1621] Coverage Improvement: privateenv.c
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Wed Jan 26 01:31:50 UTC 2011
https://www.rtems.org/bugzilla/show_bug.cgi?id=1621
--- Comment #9 from Bharath Suri <bharath.s.jois at gmail.com> 2011-01-25 19:31:49 CST ---
(In reply to comment #8)
> (In reply to comment #7)
> > To add to what I've said, if free_user_env is called only from
> > rtems_libio_share_private_env, the check "env != &rtems_global_user_env" in
> > free_user_env can be removed and this PR can be closed. Any comments?
>
> I think this analysis is correct. free_user_env() is static and only called
> in two cases:
>
> + as the destructor for the task variable and it is definitely allocated memory
> + the case where we share our environment with another task whose environment
> is not the global one. In this case, we are free'ing a malloc'ed one.
>
> Do you have a patch to address this? And to add some comments about why it is
> safe not to check for the global one.
Here is an observation...
I removed the check and ran the coverage (pc386), but still found the uncovered
bytes there. The free(env) is converted to a jmp and leaves the bytes untouched
in this case.
But the range in question does not seem to be the same case and I doubt if
removing the check would really cover the range.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list