-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-953] - Add ASAN sanitizer, Enable in CI #12370
Conversation
00ef446
to
cbcbaaf
Compare
f34735e
to
bb7e239
Compare
Iterating on some tests locally. Note: ASAN likely requires privileged docker containers. |
f900af1
to
c8f3f4f
Compare
1a3d7ec
to
fa72a38
Compare
284fb9e
to
d336fbc
Compare
d336fbc
to
0020984
Compare
Collected some thoughts on ASAN here: https://cwiki.apache.org/confluence/display/MXNET/Detecting+Memory+Leaks+and+Buffer+Overflows+in+MXNet |
23e9dd5
to
039e1aa
Compare
@mxnet-label-bot can you please add [pr-awaiting-review] |
# under the License. | ||
|
||
sudo add-apt-repository ppa:jonathonf/gcc-8.0 | ||
sudo add-apt-repository ppa:jonathonf/gcc-7.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 7.3 is also needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot. It's an error by the backport author. There's a dependency that is actually only available if you have both added.
ci/docker/runtime_functions.sh
Outdated
|
||
pushd . | ||
cd /work/build | ||
export CC="gcc-8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add cmake arguments -DCMAKE_CXX_COMPILER=/usr/bin/g++-8
-DCMAKE_CC_COMPILER=/usr/bin/gcc-8
instead? It would be more cmake'ish.
Thanks Anton. I'll give it a shot.
…On Mon, Sep 17, 2018, 4:41 AM Anton Chernov ***@***.***> wrote:
***@***.**** approved this pull request.
------------------------------
In ci/docker/install/ubuntu_gcc8.sh
<#12370 (comment)>
:
> +# 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.
+
+sudo add-apt-repository ppa:jonathonf/gcc-8.0
+sudo add-apt-repository ppa:jonathonf/gcc-7.3
Why 7.3 is also needed?
------------------------------
In ci/docker/runtime_functions.sh
<#12370 (comment)>
:
> @@ -336,6 +336,35 @@ build_ubuntu_cpu_cmake_debug() {
popd
}
+build_ubuntu_cpu_cmake_asan() {
+ set -ex
+
+ pushd .
+ cd /work/build
+ export CC="gcc-8"
Maybe add cmake arguments -DCMAKE_CXX_COMPILER=/usr/bin/g++-8
-DCMAKE_CC_COMPILER=/usr/bin/gcc-8 instead? It would be more cmake'ish.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#12370 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHGTE7WHRyDc8YX_y7lfLYmbYKX7UISnks5ub2BBgaJpZM4WNWgi>
.
|
77a4569
to
8373720
Compare
Use CMake to specify the compiler used for ASAN. This is more portable and doesn't rely on env vars.
8373720
to
b095192
Compare
Description
Add ASAN support so that users can create ASAN builds of MXNet. These builds should help users more easily address memory leaks and buffer overflows.
Enable ASAN builds in CI to display memory usage errors.
More detailed information here: https://cwiki.apache.org/confluence/display/MXNET/Detecting+Memory+Leaks+and+Buffer+Overflows+in+MXNet
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.