Skip to content

Commit 4d929f8

Browse files
committed
fix for laf intel float split not enabled if not not on a tty
1 parent 6b79e1f commit 4d929f8

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.custom-format.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
p = subprocess.Popen(["clang-format-10", "--version"], stdout=subprocess.PIPE)
3333
o, _ = p.communicate()
3434
o = str(o, "utf-8")
35-
o = o[len("clang-format version "):].strip()
35+
o = re.sub(r".*ersion ", "", o)
36+
#o = o[len("clang-format version "):].strip()
3637
o = o[:o.find(".")]
3738
o = int(o)
3839
except:

docs/Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ sending a mail to <[email protected]>.
1313
- afl-fuzz:
1414
- eliminated CPU affinity race condition for -S/-M runs
1515
- llvm_mode:
16-
- fix for laf-intel float splitting
16+
- fixes for laf-intel float splitting (thanks to mark-griffin for
17+
reporting)
1718
- LTO: autodictionary mode is a default
1819
- LTO: instrim instrumentation disabled, only classic support used
1920
as it is always better

examples/afl_untracer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ To easily run the scripts without needing to run the GUI with Ghidra:
3232
/opt/ghidra/support/analyzeHeadless /tmp/ tmp$$ -import libtestinstr.so -postscript ./ghidra_get_patchpoints.java
3333
rm -rf /tmp/tmp$$
3434
```
35+
The file is created at `~/Desktop/patches.txt`
3536

3637
### Fuzzing
3738

examples/afl_untracer/afl-untracer.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474

7575
// STEP 1:
7676

77+
/* here you need to specify the parameter for the target function */
78+
static void *(*o_function)(u8 *buf, int len);
79+
7780
/* use stdin (1) or a file on the commandline (0) */
7881
static u32 use_stdin = 1;
7982

@@ -668,13 +671,10 @@ static void sigtrap_handler(int signum, siginfo_t *si, void *context) {
668671

669672
}
670673

671-
/* here you need to specify the parameter for the target function */
672-
static void *(*o_function)(u8 *buf, int len);
673-
674674
/* the MAIN function */
675675
int main(int argc, char *argv[]) {
676676

677-
(void) personality(ADDR_NO_RANDOMIZE); // disable ASLR
677+
(void)personality(ADDR_NO_RANDOMIZE); // disable ASLR
678678

679679
pid = getpid();
680680
if (getenv("AFL_DEBUG")) debug = 1;
@@ -745,9 +745,10 @@ int main(int argc, char *argv[]) {
745745
}
746746

747747
#ifndef _DEBUG
748-
inline
748+
inline
749749
#endif
750-
static void fuzz() {
750+
static void
751+
fuzz() {
751752

752753
// STEP 3: call the function to fuzz, also the functions you might
753754
// need to call to prepare the function and - important! -
@@ -762,3 +763,4 @@ static void fuzz() {
762763
// END STEP 3
763764

764765
}
766+

llvm_mode/split-compares-pass.so.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,8 +1263,6 @@ bool SplitComparesTransform::runOnModule(Module &M) {
12631263

12641264
if (enableFPSplit) {
12651265

1266-
simplifyFPCompares(M);
1267-
12681266
errs() << "Split-floatingpoint-compare-pass: " << splitFPCompares(M)
12691267
<< " FP comparisons splitted\n";
12701268

@@ -1274,6 +1272,8 @@ bool SplitComparesTransform::runOnModule(Module &M) {
12741272

12751273
be_quiet = 1;
12761274

1275+
if (enableFPSplit) simplifyFPCompares(M);
1276+
12771277
simplifyCompares(M);
12781278

12791279
simplifyIntSignedness(M);

0 commit comments

Comments
 (0)