diff options
author | Bryan Cantrill <bryan@joyent.com> | 2019-02-04 21:36:58 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2019-03-01 11:11:54 +0000 |
commit | 92c1a61163ff6a0655b27bd429856e171e7ce5f5 (patch) | |
tree | 0d976392cefaf1c3a2aea9d415c2d86c5eb43d46 /usr/src/lib/libsaveargs/amd64/saveargs.c | |
parent | 6d3b6de806befb1050c80e5d4be2214ee68fb2b7 (diff) | |
download | illumos-joyent-92c1a61163ff6a0655b27bd429856e171e7ce5f5.tar.gz |
10468 __ctype_mask[EOF] has been working by accident
10469 GCC's -faggressive-loop-optimizations is too aggressive
10470 array over-read in has_saved_fp()
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gergő Doma <domag02@gmail.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib/libsaveargs/amd64/saveargs.c')
-rw-r--r-- | usr/src/lib/libsaveargs/amd64/saveargs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/lib/libsaveargs/amd64/saveargs.c b/usr/src/lib/libsaveargs/amd64/saveargs.c index f07ef354c1..6d3ed769f2 100644 --- a/usr/src/lib/libsaveargs/amd64/saveargs.c +++ b/usr/src/lib/libsaveargs/amd64/saveargs.c @@ -23,6 +23,9 @@ * Use is subject to license terms. */ +/* + * Copyright 2019 Joyent, Inc. + */ /* * The Sun Studio and GCC (patched for opensolaris/illumos) compilers @@ -217,7 +220,7 @@ instr_size(dis_handle_t *dhp, uint8_t *ins, unsigned int i, size_t size) static boolean_t has_saved_fp(dis_handle_t *dhp, uint8_t *ins, int size) { - int i, j; + int i, j; uint32_t n; boolean_t found_push = B_FALSE; ssize_t sz = 0; @@ -231,7 +234,7 @@ has_saved_fp(dis_handle_t *dhp, uint8_t *ins, int size) continue; n = INSTR1(ins, i); - for (j = 0; j <= NUM_FP_PUSHES; j++) + for (j = 0; j < NUM_FP_PUSHES; j++) if (save_fp_pushes[j] == n) { found_push = B_TRUE; break; @@ -240,7 +243,7 @@ has_saved_fp(dis_handle_t *dhp, uint8_t *ins, int size) if (sz != 3) continue; n = INSTR3(ins, i); - for (j = 0; j <= NUM_FP_MOVS; j++) + for (j = 0; j < NUM_FP_MOVS; j++) if (save_fp_movs[j] == n) return (B_TRUE); } |