Page MenuHomePhabricator

Remove unused positional argument for printf

Authored by protze.joachim on Dec 21 2017, 10:52 AM.



gcc on Ubuntu compiles by default with -D_FORTIFY_SOURCE=2. This results in a fatal runtime error, when kmp_msg tries to print a hint:

*** invalid %N$ use detected ***

The format string for hints only prints the second argument (string) and drops the first argument (hint id). Depending on how you read the POSIX text for printf, this could be valid. But for practical reason, i.e., unpacking the va_list passed to printf based on the formating information, it makes sense to fix the implementation and not pass the id for hint.

Failing testcases are:


Diff Detail


Event Timeline

protze.joachim edited the summary of this revision. (Show Details)
omalyshe accepted this revision.Dec 22 2017, 5:36 AM
omalyshe added a subscriber: omalyshe.

Verified on some other tests in Intel environment.

This revision is now accepted and ready to land.Dec 22 2017, 5:36 AM
Closed by commit rL321361: Remove unused positional argument for printf (authored by jprotze, committed by ). · Explain WhyDec 22 2017, 8:41 AM
This revision was automatically updated to reflect the committed changes.