add validation of printf format and arguments#10812
add validation of printf format and arguments#10812WalterBright merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#10812" |
30b2d21 to
920d3c4
Compare
|
Looks like it's already finding bugs in DMD itself. I'm so ashamed :-/ |
|
blocked by #10816 |
9c274ff to
42fda3c
Compare
|
Also make sure you made an annotated tag ( |
|
@Geod24 that worked, thanks! And finally, I understand the difference between upstream and origin. |
|
Great! If you have some time, I highly recommend this online book. Chapters 1 to 3, 7, 8 and 10 give invaluable informations. Personally, it turned what I saw as an over-complicated and obscure program I had to deal with to contribute into a powerful tool I now use for every project. Also, I've restarted your Buildkite job. |
Thanks, I couldn't figure out a way to do that without redoing all the tests. BTW, did you check the sociomantic buildkite libraries? |
|
I don't have privileges for Sociomantic libraries, so I can't fix it. |
|
The example above was just using Ocean as an example because Undead was already retriggered and Ocean is the only one still failing ( And for the fixes, they take pull requests. But even then, making release is more involved. |
wilzbach
left a comment
There was a problem hiding this comment.
Needs to be a deprecation as we formally agreed to no longer ship breaking releases.
|
You're right, and I was planning to make it a -preview switch after we got as much of our stuff fixed as we can. The only thing left is the ocean library. @Geod24 how about taking care of it? |
|
It doesn't need to be hidden behind a preview switch (those get never found nor activated), it just needs to a non-breaking deprecation. |
036b467 to
eaf100a
Compare
|
Good idea, deprecation it is. |
|
@Geod24 : There is a retry button next to it: Nope. Must be something I'm not privileged to access. |
|
@wilzbach This PR is now ready to go. The buildkite/dmd bugs look unrelated. |
changelog/chkprintf.md
Outdated
| @@ -0,0 +1,51 @@ | |||
| Check that arguments to a printf format string are compatible | |||
| with that string. Issue errors for incompatibilities. | |||
There was a problem hiding this comment.
This is a title and so two sentences are far too long.
Also it doesn't show up in preview. @wilzbach do we support md file ? Our documentation only says .dd.
There was a problem hiding this comment.
urgh, it'll take a couple hours to go all green again if I modify the changelog :-(
There was a problem hiding this comment.
Yeah while DMD now supports markdown, the changelog script hasn't been updated yet.
|
|
||
| No attempt is made to fix the arguments or the format string. | ||
|
|
||
| In order to use non-Standard printf formats, an easy workaround is: |
There was a problem hiding this comment.
non-Standard, why the uppercase ?
There was a problem hiding this comment.
Because I am referring to the C99 Standard, not just any standard.
|
Restarted the failing Buildkite tests. As mentioned, could you split this into two commits, this way if the |
|
Reverting this PR is pretty much just deleting |
eaf100a to
1a5f792
Compare
|
spec pull: dlang/dlang.org#2760 |

This wasn't that hard to do, so I just did it.
I know it needs a changelog.
It currently only works for
printf, but I'll extend to any function with printf formatting after this is incorporated.