Opened 21 months ago

Closed 21 months ago

Last modified 21 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 21 months ago.
test case

Download all attachments as: .zip

Change History (4)

by bhaible, 21 months ago

Attachment: foo.c added

test case

comment:2 by waddlesplash, 21 months ago

Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: newclosed

Fixed in hrev56915.

comment:3 by kallisti5, 21 months ago

Keywords: r1beta4-fixes added

Cherry picked to r1beta4 too.

Note: See TracTickets for help on using tickets.