1.1 --- a/src/os/linux/vm/jsig.c Wed Jun 12 11:17:39 2013 +0200 1.2 +++ b/src/os/linux/vm/jsig.c Wed Jul 17 12:22:57 2013 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -107,7 +107,7 @@ 1.11 1.12 signal_lock(); 1.13 1.14 - sigused = (MASK(sig) & jvmsigs) != 0; 1.15 + sigused = (sig < MAXSIGNUM) && ((MASK(sig) & jvmsigs) != 0); 1.16 if (jvm_signal_installed && sigused) { 1.17 /* jvm has installed its signal handler for this signal. */ 1.18 /* Save the handler. Don't really install it. */ 1.19 @@ -116,7 +116,7 @@ 1.20 1.21 signal_unlock(); 1.22 return oldhandler; 1.23 - } else if (jvm_signal_installing) { 1.24 + } else if (sig < MAXSIGNUM && jvm_signal_installing) { 1.25 /* jvm is installing its signal handlers. Install the new 1.26 * handlers and save the old ones. jvm uses sigaction(). 1.27 * Leave the piece here just in case. */ 1.28 @@ -165,7 +165,7 @@ 1.29 1.30 signal_lock(); 1.31 1.32 - sigused = (MASK(sig) & jvmsigs) != 0; 1.33 + sigused = (sig < MAXSIGNUM) && ((MASK(sig) & jvmsigs) != 0); 1.34 if (jvm_signal_installed && sigused) { 1.35 /* jvm has installed its signal handler for this signal. */ 1.36 /* Save the handler. Don't really install it. */ 1.37 @@ -178,7 +178,7 @@ 1.38 1.39 signal_unlock(); 1.40 return 0; 1.41 - } else if (jvm_signal_installing) { 1.42 + } else if (sig < MAXSIGNUM && jvm_signal_installing) { 1.43 /* jvm is installing its signal handlers. Install the new 1.44 * handlers and save the old ones. */ 1.45 res = call_os_sigaction(sig, act, &oldAct);