11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 25 /* 26 * @test Testlibadimalloc.java 27 * @bug 8141445 28 * @summary make sure the Solaris Sparc M7 libadimalloc.so library generates SIGSEGV's on buffer overflow 29 * @requires (os.family == "solaris" & os.arch == "sparcv9") 30 * @modules java.base/jdk.internal.misc 31 * @library /testlibrary 32 * @build jdk.test.lib.* 33 * @compile SEGVOverflow.java 34 * @run driver Testlibadimalloc 35 */ 36 37 import java.io.*; 38 import java.nio.file.*; 39 import java.util.*; 40 import jdk.test.lib.ProcessTools; 41 42 public class Testlibadimalloc { 43 44 // Expected return value when java program cores 45 static final int EXPECTED_RET_VAL = 6; 46 47 public static void main(String[] args) throws Throwable { 48 49 // See if the libadimalloc.so library exists 50 Path path = Paths.get("/usr/lib/64/libadimalloc.so"); 51 52 // If the libadimalloc.so file does not exist, pass the test 53 if (!(Files.isRegularFile(path) || Files.isSymbolicLink(path))) { 54 System.out.println("Test skipped; libadimalloc.so does not exist"); 55 return; 56 } 57 58 // Get the JDK, library and class path properties 59 String libpath = System.getProperty("java.library.path"); 60 | 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 25 /* 26 * @test Testlibadimalloc.java 27 * @bug 8141445 28 * @summary make sure the Solaris Sparc M7 libadimalloc.so library generates SIGSEGV's on buffer overflow 29 * @requires (os.family == "solaris" & os.arch == "sparcv9") 30 * @modules java.base/jdk.internal.misc 31 * @library /test/lib 32 * @compile SEGVOverflow.java 33 * @run driver Testlibadimalloc 34 */ 35 36 import java.io.*; 37 import java.nio.file.*; 38 import java.util.*; 39 import jdk.test.lib.process.ProcessTools; 40 41 public class Testlibadimalloc { 42 43 // Expected return value when java program cores 44 static final int EXPECTED_RET_VAL = 6; 45 46 public static void main(String[] args) throws Throwable { 47 48 // See if the libadimalloc.so library exists 49 Path path = Paths.get("/usr/lib/64/libadimalloc.so"); 50 51 // If the libadimalloc.so file does not exist, pass the test 52 if (!(Files.isRegularFile(path) || Files.isSymbolicLink(path))) { 53 System.out.println("Test skipped; libadimalloc.so does not exist"); 54 return; 55 } 56 57 // Get the JDK, library and class path properties 58 String libpath = System.getProperty("java.library.path"); 59 |