Bug 1432381 Promote ints to unsigned ints, because they are assigned an unsigned int value 2148073472u r?bobowen
MozReview-Commit-ID: ENfCp5e0cSu
new file mode 100644
--- /dev/null
+++ b/security/sandbox/chromium-shim/patches/with_update/mingw_fix_narrowing_conversion.patch
@@ -0,0 +1,57 @@
+# HG changeset patch
+# User Tom Ritter <tom@mozilla.com>
+# Date 1516719664 21600
+# Tue Jan 23 09:01:04 2018 -0600
+# Node ID bac3e3b07a973f923ece3e1fed227a8122c29349
+# Parent 2f7b7b76bf330097dcf9369f6514c3855625931f
+Bug 1432381 Promote ints to unsigned ints, because they are assigned an unsigned int value 2148073472u r?bobowen
+
+diff --git a/security/sandbox/chromium/sandbox/win/src/sidestep/mini_disassembler_types.h b/security/sandbox/chromium/sandbox/win/src/sidestep/mini_disassembler_types.h
+--- a/security/sandbox/chromium/sandbox/win/src/sidestep/mini_disassembler_types.h
++++ b/security/sandbox/chromium/sandbox/win/src/sidestep/mini_disassembler_types.h
+@@ -122,19 +122,19 @@ struct SpecificOpcode {
+ int table_index_;
+
+ // The opcode type
+ InstructionType type_;
+
+ // Description of the type of the dest, src and aux operands,
+ // put together from an enOperandType flag and an enAddressingMethod
+ // flag.
+- int flag_dest_;
+- int flag_source_;
+- int flag_aux_;
++ unsigned int flag_dest_;
++ unsigned int flag_source_;
++ unsigned int flag_aux_;
+
+ // We indicate the mnemonic for debugging purposes
+ const char* mnemonic_;
+ };
+
+ // The information we keep in our tables about each of the different
+ // valid instructions recognized by the IA-32 architecture.
+ struct Opcode {
+@@ -143,19 +143,19 @@ struct Opcode {
+ int table_index_;
+
+ // The opcode type
+ InstructionType type_;
+
+ // Description of the type of the dest, src and aux operands,
+ // put together from an enOperandType flag and an enAddressingMethod
+ // flag.
+- int flag_dest_;
+- int flag_source_;
+- int flag_aux_;
++ unsigned int flag_dest_;
++ unsigned int flag_source_;
++ unsigned int flag_aux_;
+
+ // We indicate the mnemonic for debugging purposes
+ const char* mnemonic_;
+
+ // Alternative opcode info if certain prefixes are specified.
+ // In most cases, all of these are zeroed-out. Only used if
+ // bPrefixDependent is true.
+ bool is_prefix_dependent_;
--- a/security/sandbox/chromium-shim/patches/with_update/patch_order.txt
+++ b/security/sandbox/chromium-shim/patches/with_update/patch_order.txt
@@ -11,9 +11,10 @@ revert_c++14_index_sequence_usage.patch
fix_Wcomma_warning_in_time_cc.patch
allow_read_only_all_paths_rule.patch
revert_TargetNtSetInformationThread_change.patch
mingw_base_win_get_caller.patch
mingw_duplicate_instatinations.patch
mingw_msvc_requirement_error.patch
mingw_copy_s.patch
mingw_operator_new.patch
-mingw_cast_getprocaddress.patch
\ No newline at end of file
+mingw_cast_getprocaddress.patch
+mingw_fix_narrowing_conversion.patch
\ No newline at end of file
--- a/security/sandbox/chromium/sandbox/win/src/sidestep/mini_disassembler_types.h
+++ b/security/sandbox/chromium/sandbox/win/src/sidestep/mini_disassembler_types.h
@@ -122,19 +122,19 @@ struct SpecificOpcode {
int table_index_;
// The opcode type
InstructionType type_;
// Description of the type of the dest, src and aux operands,
// put together from an enOperandType flag and an enAddressingMethod
// flag.
- int flag_dest_;
- int flag_source_;
- int flag_aux_;
+ unsigned int flag_dest_;
+ unsigned int flag_source_;
+ unsigned int flag_aux_;
// We indicate the mnemonic for debugging purposes
const char* mnemonic_;
};
// The information we keep in our tables about each of the different
// valid instructions recognized by the IA-32 architecture.
struct Opcode {
@@ -143,19 +143,19 @@ struct Opcode {
int table_index_;
// The opcode type
InstructionType type_;
// Description of the type of the dest, src and aux operands,
// put together from an enOperandType flag and an enAddressingMethod
// flag.
- int flag_dest_;
- int flag_source_;
- int flag_aux_;
+ unsigned int flag_dest_;
+ unsigned int flag_source_;
+ unsigned int flag_aux_;
// We indicate the mnemonic for debugging purposes
const char* mnemonic_;
// Alternative opcode info if certain prefixes are specified.
// In most cases, all of these are zeroed-out. Only used if
// bPrefixDependent is true.
bool is_prefix_dependent_;