Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added assertion to help suppress clang warnings #757

Merged
merged 3 commits into from
Dec 23, 2016

Conversation

patcheng
Copy link
Contributor

Similar to #727

But the clang warning I got traced back to the pointer returned by PushUnsafe.

I assume this case never happens, so an assert should be sufficient. At least clang is happy with an assertion.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 99.935% when pulling 91a803d on patcheng:feature/fix_clang_warning into ffc7942 on miloyip:master.

Previously, os.Push(0) would do nothing as well. But with the newly added assertion, is the stack is empty, it will fail the assertion.
@coveralls
Copy link

coveralls commented Sep 30, 2016

Coverage Status

Coverage increased (+3.0e-05%) to 99.937% when pulling 95224af on patcheng:feature/fix_clang_warning into ffc7942 on miloyip:master.

@miloyip miloyip merged commit 03a7391 into Tencent:master Dec 23, 2016
@patcheng patcheng deleted the feature/fix_clang_warning branch February 1, 2017 16:56
martongreber added a commit to martongreber/kudu that referenced this pull request Jul 21, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] Building
Kudu on different OS and compiler combinations resulted in various
errors. Using Clang from the new LLVM 11 thridparty build resulted in
consisted successful builds. Therefore the thirparty clang is used both
in the local cmake and the distributed test script. The homebrew prefix
is changed from /usr/local to /opt/homebrew on ARM macs. In places
where package locations are provided, and ARM alternative location has
been added. Added a patch to fix null pointer dereference in rapidjson.
[6] Added another patch containing assertions to a similar issue, to
fix suppress clang warnings in rapidjson. [7] Building tests in glog
has to be turned off as it causes linker error in tsan build. [8] With
the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN race occurences
came up with LLVM regexes, added those to the sanitizer suppression
list. pstack_watcher uses gdb, pstack or gstack to examine a process.
None of those are available on ARM macs. Added lldb support, to have a
fallback on ARM macs. Finally libcurl needed to be upgraded to 7.80 as
the old version gave symbol errors during release build on M1 mac.

[1] Change-Id: I21abd1749fdfdcde412f5a2ca2245c42da20d4f3
[2] Change-Id: Idc5721cb2445303b2e79d08b547e746929c7486d
[3] Change-Id: I029a858d2da77cea84e7e6856b8a5ac02713152d
[4] Change-Id: Id9c32abe256978158617a4fe3a3c34e9bfd00fb2
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
martongreber added a commit to martongreber/kudu that referenced this pull request Jul 22, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] Building
Kudu on different OS and compiler combinations resulted in various
errors. Using Clang from the new LLVM 11 thridparty build resulted in
consisted successful builds. Therefore the thirparty clang is used both
in the local cmake and the distributed test script. The homebrew prefix
is changed from /usr/local to /opt/homebrew on ARM macs. In places
where package locations are provided, and ARM alternative location has
been added. Added a patch to fix null pointer dereference in rapidjson.
[6] Added another patch containing assertions to a similar issue, to
fix suppress clang warnings in rapidjson. [7] Building tests in glog
has to be turned off as it causes linker error in tsan build. [8] With
the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN race occurences
came up with LLVM regexes, added those to the sanitizer suppression
list. pstack_watcher uses gdb, pstack or gstack to examine a process.
None of those are available on ARM macs. Added lldb support, to have a
fallback on ARM macs. Finally libcurl needed to be upgraded to 7.80 as
the old version gave symbol errors during release build on M1 mac.

[1] Change-Id: I21abd1749fdfdcde412f5a2ca2245c42da20d4f3
[2] Change-Id: Idc5721cb2445303b2e79d08b547e746929c7486d
[3] Change-Id: I029a858d2da77cea84e7e6856b8a5ac02713152d
[4] Change-Id: Id9c32abe256978158617a4fe3a3c34e9bfd00fb2
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
martongreber added a commit to martongreber/kudu that referenced this pull request Jul 22, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] Building
Kudu on different OS and compiler combinations resulted in various
errors. Using Clang from the new LLVM 11 thridparty build resulted in
consisted successful builds. Therefore the thirparty clang is used both
in the local cmake and the distributed test script. The homebrew prefix
is changed from /usr/local to /opt/homebrew on ARM macs. In places
where package locations are provided, and ARM alternative location has
been added. Added a patch to fix null pointer dereference in rapidjson.
[6] Added another patch containing assertions to a similar issue, to
fix suppress clang warnings in rapidjson. [7] Building tests in glog
has to be turned off as it causes linker error in tsan build. [8] With
the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN race occurences
came up with LLVM regexes, added those to the sanitizer suppression
list. pstack_watcher uses gdb, pstack or gstack to examine a process.
None of those are available on ARM macs. Added lldb support, to have a
fallback on ARM macs. Finally libcurl needed to be upgraded to 7.80 as
the old version gave symbol errors during release build on M1 mac.

[1] Change-Id: I21abd1749fdfdcde412f5a2ca2245c42da20d4f3
[2] Change-Id: Idc5721cb2445303b2e79d08b547e746929c7486d
[3] Change-Id: I029a858d2da77cea84e7e6856b8a5ac02713152d
[4] Change-Id: Id9c32abe256978158617a4fe3a3c34e9bfd00fb2
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
martongreber added a commit to martongreber/kudu that referenced this pull request Jul 22, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] Building
Kudu on different OS and compiler combinations resulted in various
errors. Using Clang from the new LLVM 11 thridparty build resulted in
consisted successful builds. Therefore the thirparty clang is used both
in the local cmake and the distributed test script. The homebrew prefix
is changed from /usr/local to /opt/homebrew on ARM macs. In places
where package locations are provided, and ARM alternative location has
been added. Added a patch to fix null pointer dereference in rapidjson.
[6] Added another patch containing assertions to a similar issue, to
fix suppress clang warnings in rapidjson. [7] Building tests in glog
has to be turned off as it causes linker error in tsan build. [8] With
the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN race occurences
came up with LLVM regexes, added those to the sanitizer suppression
list. pstack_watcher uses gdb, pstack or gstack to examine a process.
None of those are available on ARM macs. Added lldb support, to have a
fallback on ARM macs. Finally libcurl needed to be upgraded to 7.80 as
the old version gave symbol errors during release build on M1 mac.

[1] Change-Id: I21abd1749fdfdcde412f5a2ca2245c42da20d4f3
[2] Change-Id: Idc5721cb2445303b2e79d08b547e746929c7486d
[3] Change-Id: I029a858d2da77cea84e7e6856b8a5ac02713152d
[4] Change-Id: Id9c32abe256978158617a4fe3a3c34e9bfd00fb2
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
martongreber added a commit to martongreber/kudu that referenced this pull request Jul 28, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] Building
Kudu on different OS and compiler combinations resulted in various
errors. Using Clang from the new LLVM 11 thridparty build resulted in
consisted successful builds. Therefore the thirparty clang is used both
in the local cmake and the distributed test script. The homebrew prefix
is changed from /usr/local to /opt/homebrew on ARM macs. In places
where package locations are provided, and ARM alternative location has
been added. Added a patch to fix null pointer dereference in rapidjson.
[6] Added another patch containing assertions to a similar issue, to
fix suppress clang warnings in rapidjson. [7] Building tests in glog
has to be turned off as it causes linker error in tsan build. [8] With
the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN race occurences
came up with LLVM regexes, added those to the sanitizer suppression
list. pstack_watcher uses gdb, pstack or gstack to examine a process.
None of those are available on ARM macs. Added lldb support, to have a
fallback on ARM macs. Finally libcurl needed to be upgraded to 7.80 as
the old version gave symbol errors during release build on M1 mac.

[1] Change-Id: I21abd1749fdfdcde412f5a2ca2245c42da20d4f3
[2] Change-Id: Idc5721cb2445303b2e79d08b547e746929c7486d
[3] Change-Id: I029a858d2da77cea84e7e6856b8a5ac02713152d
[4] Change-Id: Id9c32abe256978158617a4fe3a3c34e9bfd00fb2
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
martongreber added a commit to martongreber/kudu that referenced this pull request Aug 1, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] The
homebrew prefix is changed from /usr/local to /opt/homebrew on ARM macs.
In places where package locations are provided, an ARM alternative
location has been added. Added a patch [6] to fix null pointer
dereference in rapidjson. Added another patch [7] containing assertions
to a similar suppress clang warnings in rapidjson. Building tests in
glog has to be turned off [8] as it causes linker error in tsan build.
With the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN races
came up with LLVM regexes, added those to the sanitizer suppression
list.

[1] Change-Id: https://gerrit.cloudera.org/#/c/18460/
[2] Change-Id: https://gerrit.cloudera.org/#/c/18461/
[3] Change-Id: https://gerrit.cloudera.org/#/c/18464/
[4] Change-Id: https://gerrit.cloudera.org/#/c/16768/
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
martongreber added a commit to martongreber/kudu that referenced this pull request Aug 4, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] The
homebrew prefix is changed from /usr/local to /opt/homebrew on ARM macs.
In places where package locations are provided, an ARM alternative
location has been added. Added a patch [6] to fix null pointer
dereference in rapidjson. Added another patch [7] containing assertions
to a similar suppress clang warnings in rapidjson. Building tests in
glog has to be turned off [8] as it causes linker error in tsan build.
With the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN races
came up with LLVM regexes, added those to the sanitizer suppression
list.

[1] Change-Id: https://gerrit.cloudera.org/#/c/18460/
[2] Change-Id: https://gerrit.cloudera.org/#/c/18461/
[3] Change-Id: https://gerrit.cloudera.org/#/c/18464/
[4] Change-Id: https://gerrit.cloudera.org/#/c/16768/
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
asfgit pushed a commit to apache/kudu that referenced this pull request Aug 5, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] The
homebrew prefix is changed from /usr/local to /opt/homebrew on ARM macs.
In places where package locations are provided, an ARM alternative
location has been added. Added a patch [6] to fix null pointer
dereference in rapidjson. Added another patch [7] containing assertions
to a similar suppress clang warnings in rapidjson. Building tests in
glog has to be turned off [8] as it causes linker error in tsan build.
With the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN races
came up with LLVM regexes, added those to the sanitizer suppression
list.

[1] Change-Id: https://gerrit.cloudera.org/#/c/18460/
[2] Change-Id: https://gerrit.cloudera.org/#/c/18461/
[3] Change-Id: https://gerrit.cloudera.org/#/c/18464/
[4] Change-Id: https://gerrit.cloudera.org/#/c/16768/
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
Reviewed-on: http://gerrit.cloudera.org:8080/18770
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <alexey@apache.org>
martongreber added a commit to martongreber/kudu that referenced this pull request Aug 15, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] The
homebrew prefix is changed from /usr/local to /opt/homebrew on ARM macs.
In places where package locations are provided, an ARM alternative
location has been added. Added a patch [6] to fix null pointer
dereference in rapidjson. Added another patch [7] containing assertions
to a similar suppress clang warnings in rapidjson. Building tests in
glog has to be turned off [8] as it causes linker error in tsan build.
With the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN races
came up with LLVM regexes, added those to the sanitizer suppression
list.

[1] Change-Id: https://gerrit.cloudera.org/#/c/18460/
[2] Change-Id: https://gerrit.cloudera.org/#/c/18461/
[3] Change-Id: https://gerrit.cloudera.org/#/c/18464/
[4] Change-Id: https://gerrit.cloudera.org/#/c/16768/
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
zhangyifan27 pushed a commit to zhangyifan27/kudu that referenced this pull request Dec 28, 2022
The macOS Monterey OS upgrade broke glog 0.3.5, moreover building Kudu
with LLVM 9 on Apple silicon is not really feasible. There has been
multiple non-merged patches submitted to tackle these issues:
Upgrade glog to 0.6.0 [1]
Fix codegen build on MacOS Monterey [2]
Fix building on Apple M1 [3]
Upgrade to LLVM 11 and IWYU 0.15 [4]
This patch squashes all of the above and provides the necessary
glue changes.

LLVM is updated to version 11 and glog to version 0.6.0 to fix the
initial build issues. Building the glog tests has to be turned off as
it causes linker error in TSAN build. The optional ZLIB dependency in
LLVM-IWYU is removed as the original issue -mentioned in the comments-
has been resolved, and this caused build issues on Unix. [5] The
homebrew prefix is changed from /usr/local to /opt/homebrew on ARM macs.
In places where package locations are provided, an ARM alternative
location has been added. Added a patch [6] to fix null pointer
dereference in rapidjson. Added another patch [7] containing assertions
to a similar suppress clang warnings in rapidjson. Building tests in
glog has to be turned off [8] as it causes linker error in tsan build.
With the clang upgrade it now links against libatomic in TSAN builds. In
dist-test.py libatomic is added to the list of shipped libraries as it
was missing on the target machines. A couple of new TSAN races
came up with LLVM regexes, added those to the sanitizer suppression
list.

[1] Change-Id: https://gerrit.cloudera.org/#/c/18460/
[2] Change-Id: https://gerrit.cloudera.org/#/c/18461/
[3] Change-Id: https://gerrit.cloudera.org/#/c/18464/
[4] Change-Id: https://gerrit.cloudera.org/#/c/16768/
[5] https://github.com/include-what-you-use/include-what-you-use/
    issues/539
[6] Tencent/rapidjson#727
[7] Tencent/rapidjson#757
[8] google/glog#54

Change-Id: I9877f95340b969308c317a6bac50665ff78e329e
Reviewed-on: http://gerrit.cloudera.org:8080/18770
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <alexey@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants