Karthikey Kadati commented on a discussion on 
testsuites/validation/tc-timecounter-install.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1163#note_147676

 >  
 >  static void NtpUpdateAdjustmentSlower( int64_t *adjustment, time_t *newsec )
 >  {
 > -  *adjustment = -(( (int64_t) 5000 ) << 32);
 > +  *adjustment = -( (int64_t) 5000 << 32 );

I see the confusion. My local `.c` file was already correct, but the corrupted 
`rtems-central` 

spec`-( (int64_t) 5000 ) << 32` overwrote it during a sync.

Because the unary minus has higher precedence than the shift, it negates the 
value first, which is Undefined Behavior and crashes the build. I corrected 
this at the core in Central some days ago. The diff appeared to be just a minor 
parenthesis change, but it was actually resolving that synchronization mistake 
and restoring the legal C logic that the generator broke.

I've since updated the YAML to exactly match the correct logic `-(( (int64_t) 
5000 ) << 32)`to ensure the sync is clean, and I have removed the redundant 
commit to keep the history clear.

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


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to