Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#18348 closed bug (fixed)

call_once function does not work

Reported by: bhaible Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: System/libroot.so Version: R1/beta4
Keywords: r1beta4-fixes Cc:
Blocked By: Blocking:
Platform: All

Description

According to ISO C 23 section 7.28.2.1, "The call_once function uses the once_flag pointed to by flag to ensure that func is called exactly once, the first time the call_once function is called with that value of flag."

In Haiku r1beta4, after the first call to call_once, func possibly has not been called.

How to reproduce:

$ gcc -ggdb -Wall foo.c
$ ./a.out
Abort

Attachments (1)

foo.c (234 bytes ) - added by bhaible 13 months ago.
test case

Download all attachments as: .zip

Change History (4)

by bhaible, 13 months ago

Attachment: foo.c added

test case

comment:2 by waddlesplash, 13 months ago

Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: newclosed

Fixed in hrev56915.

comment:3 by kallisti5, 13 months ago

Keywords: r1beta4-fixes added

Cherry picked to r1beta4 too.

Note: See TracTickets for help on using tickets.