marcoabreu commented on a change in pull request #15489: Dynamic Library 
Loading Support
URL: https://github.com/apache/incubator-mxnet/pull/15489#discussion_r310757672
 
 

 ##########
 File path: tests/python/unittest/test_library_loading.py
 ##########
 @@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This test checks if dynamic loading of library into MXNet is successful
+
+import os
+import platform
+import unittest
+import mxnet as mx
+from mxnet.test_utils import download
+
+def check_platform():
+    return platform.machine() not in ['x86_64', 'AMD64']
+
[email protected](check_platform(), "not all machine types supported")
+def test_library_loading():
+    if (os.name=='posix'):
+        lib = 'mylib.so'
+    elif (os.name=='nt'):
+        lib = 'mylib.dll'
+
+    fname = 
mx.test_utils.download('https://mxnet-demo-models.s3.amazonaws.com/lib_binary/'+lib)
 
 Review comment:
   @mseth10 
   
   Unfortunately, this test introduces a security vulnerability. Please replace 
it as soon as possible as this poses a security threat to our system as well as 
our users since this allows arbitrary code execution. I'd appreciate it if you 
would provide a replacement within the next 24h. 
https://github.com/apache/incubator-mxnet/pull/15755 is the corresponding 
revert PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to