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

[wasm] fix wasm compilation with clang HEAD #13765

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

asraa
Copy link
Contributor

@asraa asraa commented Oct 26, 2020

Signed-off-by: Asra Ali [email protected]

Commit Message: Short term fix WASM compilation with clang HEAD.
Additional Description: OSS-Fuzz builds have been failing to compile WASM. They compile with clang at HEAD to get the latest libfuzzer.

FAILED: obj/torque_generated_initializers/array-reduce-tq-csa.o 
clang++ -MMD -MF obj/torque_generated_initializers/array-reduce-tq-csa.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_MINOR_MC -DV8_CONCURRENT_MARKING -DV8_ARRAY_BUFFER_EXTENSION -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -I../.. -Igen -I../.. -I../../include -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -m64 -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -fno-omit-frame-pointer -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -g1 -fvisibility=default -Wexit-time-destructors -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -stdlib=libc++ -Wno-sign-compare -Wno-deprecated-copy -Wno-unknown-warning-option -Wno-range-loop-analysis -Wno-implicit-int-float-conversion -Wno-builtin-assume-aligned-alignment -Wno-final-dtor-non-final-class -c gen/torque-generated/src/builtins/array-reduce-tq-csa.cc -o obj/torque_generated_initializers/array-reduce-tq-csa.o
In file included from gen/torque-generated/src/builtins/array-reduce-tq-csa.cc:1:
In file included from ../../src/builtins/builtins-array-gen.h:8:
In file included from ../../src/codegen/code-stub-assembler.h:10:
../../src/base/macros.h:332:12: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
  return x & -m;
  ~~~~~~ ~~^~~~
../../src/heap/spaces.h:157:14: note: in instantiation of function template specialization 'RoundDown<int>' requested here
      return RoundDown(size, kCodeAlignment);
             ^
1 error generated.

Testing: Built fuzzers with OSS-Fuzz's docker image from this checkout.

Is there a better place to fix this issue in the longterm?

Signed-off-by: Asra Ali <[email protected]>
@lizan lizan merged commit e94ba85 into envoyproxy:master Oct 27, 2020
PiotrSikora pushed a commit to PiotrSikora/envoy that referenced this pull request Nov 19, 2020
istio-testing pushed a commit to istio/envoy that referenced this pull request Nov 20, 2020
* build: update rules_rust to allow Rustc in RBE (envoyproxy#13595)

Signed-off-by: Lizan Zhou <[email protected]>
Signed-off-by: Piotr Sikora <[email protected]>

* fix macos v8 build (envoyproxy#13572)

Signed-off-by: Rama Chavali <[email protected]>

* wasm: update proxy-wasm-cpp-host (envoyproxy#13606)

The PR updates proxy-wasm-cpp-host dependency for enhancing the capability and fixing a bug in WASM extensions.

The change consists of three PRs in proxy-wasm-cpp-host:

1. proxy-wasm/proxy-wasm-cpp-host#68 @PiotrSikora
2. proxy-wasm/proxy-wasm-cpp-host#65 @mathetake (me)
3. proxy-wasm/proxy-wasm-cpp-host#64 @mathetake (me)

The code change can be found at proxy-wasm/proxy-wasm-cpp-host@49ed20e...c5658d3 .

1 & 2 enhance WASM capability, and 3 fixes a bug in situations where users share vm_id for multiple filters. For details, please take a look at these original PRs.

Signed-off-by: mathetake <[email protected]>
Signed-off-by: Piotr Sikora <[email protected]>

* wasm: re-enable tests with precompiled modules. (envoyproxy#13583)

Fixes envoyproxy#12335.

Signed-off-by: Piotr Sikora <[email protected]>

* wasm: flip the meaning of the "repository" in envoy_wasm_cc_binary(). (envoyproxy#13621)

Change the meaning of the "repository" parameter to refer to an external
Bazel repository, instead of using "@envoy" in targets that are included
in the Envoy repository.

This aligns with other envoy_* rules.

Signed-off-by: Piotr Sikora <[email protected]>

* build: support ppc64le with wasm (envoyproxy#13657)

The build has only been tested with gn git sha 5da62d5 as
recommended by ppc64 maintainers of the v8 runtime.

Signed-off-by: Christopher M. Luciano <[email protected]>

* wasm: remove no longer needed Emscripten metadata. (envoyproxy#13667)

Signed-off-by: Piotr Sikora <[email protected]>

* fix wasm compilation (envoyproxy#13765)

Signed-off-by: Asra Ali <[email protected]>

* wasm: strip only Custom Sections with precompiled Wasm modules. (envoyproxy#13775)

Signed-off-by: Piotr Sikora <[email protected]>

* build: don't build shared libraries for zlib and zlib-ng. (envoyproxy#13652)

Signed-off-by: Piotr Sikora <[email protected]>

* wasm: update V8 to v8.7.220.10. (envoyproxy#13568)

Signed-off-by: Piotr Sikora <[email protected]>

* build: exclude wee8/out from inputs (envoyproxy#13866)

If you build without sandboxing for performance, the output files from
this custom build genrule contained timestamps which caused it to
rebuild every single build.

Signed-off-by: Keith Smiley <[email protected]>

* tls: fix detection of the upstream connection close event. (envoyproxy#13858)

Fixes envoyproxy#13856.

Signed-off-by: Piotr Sikora <[email protected]>

* wasm: Force stop iteration after local response is sent (envoyproxy#13930)

Resolves envoyproxy#13857

ref:
-proxy-wasm/proxy-wasm-rust-sdk#44
-proxy-wasm/proxy-wasm-cpp-host#88
-proxy-wasm/proxy-wasm-cpp-host#93

Signed-off-by: mathetake <[email protected]>
Signed-off-by: Piotr Sikora <[email protected]>

* wasm: fix order of callbacks for paused requests. (envoyproxy#13840)

Fixes proxy-wasm/proxy-wasm-rust-sdk#43.

Signed-off-by: Piotr Sikora <[email protected]>

* wasm: fix network leak (envoyproxy#13836)

Signed-off-by: Kuat Yessenov <[email protected]>

Co-authored-by: Lizan Zhou <[email protected]>
Co-authored-by: Rama Chavali <[email protected]>
Co-authored-by: Takeshi Yoneda <[email protected]>
Co-authored-by: cmluciano <[email protected]>
Co-authored-by: asraa <[email protected]>
Co-authored-by: Keith Smiley <[email protected]>
Co-authored-by: Takeshi Yoneda <[email protected]>
Co-authored-by: Kuat <[email protected]>
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.

2 participants