RTEMS | bsps/m68k/mcf5329/start/init5329.c: Address comparison of arrays (!598)

Kinsey Moore (@opticron) gitlab at rtems.org
Fri Jul 18 15:12:21 UTC 2025




Kinsey Moore started a new discussion on bsps/m68k/mcf5329/start/init5329.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/598#note_126841

 >    /*
 >     * Move initialized data from ROM to RAM.
 >     */
 > -  if (_data_src_start != _data_dest_start) {
 > -    dbp = (uint8_t *) _data_dest_start;
 > -    sbp = (uint8_t *) _data_src_start;
 > -    i = _data_dest_end - _data_dest_start;

This does not make `i` == 0 if the source and destination are the same. If they are the same, the new code will still copy the entire block of memory to itself.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/598#note_126841
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250718/ce02b1f5/attachment-0001.htm>


More information about the bugs mailing list