@@ -361,8 +361,21 @@ modifier functionality.
361
361
362
362
## Problems with mixing non-target-modifiers
363
363
364
- It's rather common to want a flag to be applied everywhere, even if it is not
365
- ABI breaking. This section discusses some of these cases.
364
+ I discussed this proposal with people from other communities (mainly kernel and
365
+ C folks), and they shared several other cases where mixing flags are a problem.
366
+ They pointed out that there are some flags where mixing them is really bad and
367
+ should be detected, but which are not ABI issues or unsound per se. The most
368
+ common example of this is exploit mitigations, where mixing the flags will
369
+ silently lead to a vulnerable binary. On the other hand, ABI mismatches usually
370
+ fail in a loud way, so they were not as concerned about those.
371
+
372
+ The sections below describe several such cases. They are intended to provide
373
+ additional context for the reader to better understand the problem space. We
374
+ will likely want to use the same infrastructure for detecting some of the
375
+ mismatches mentioned below, but the precise list is out of scope of this RFC.
376
+
377
+ Since the cases below are not unsound, the flag for overriding them should not
378
+ include the word "unsafe".
366
379
367
380
### Exploit mitigations
368
381
@@ -431,13 +444,6 @@ Mixing CUs with different options for `-Cforce-unwind-tables`,
431
444
consider to be invalid as you may be unable to read the debugging information.
432
445
But it would not be an ABI issue.
433
446
434
- ### Detection for non-target-modifiers
435
-
436
- We will most likely want some way to detect mismatches of some of the cases
437
- above; especially the exploit mitigations. However, as these cases are not ABI
438
- breaking, the flag for silencing the error/warning should not include the word
439
- "unsafe".
440
-
441
447
# Prior art
442
448
[ prior-art ] : #prior-art
443
449
0 commit comments