Closed
Description
- Version: v8.13.0
- Platform: RHEL 7.6
- Subsystem: http2
Trying to build node with ./configure --debug-http2
fails with
In file included from ../src/node_http2.cc:4:0:
../src/node_http2.cc: In member function 'void node::http2::Http2Session::HandleOriginFrame(const nghttp2_frame*)':
../src/node_http2.h:39:52: error: expected primary-expression before ')' token
#define DEBUG_HTTP2(...) debug_vfprintf(__VA_ARGS__);
^
../src/node_http2.h:51:7: note: in expansion of macro 'DEBUG_HTTP2'
DEBUG_HTTP2("Http2Session %s (%.0lf) " message "\n", \
^~~~~~~~~~~
../src/node_http2.cc:1440:3: note: in expansion of macro 'DEBUG_HTTP2SESSION2'
DEBUG_HTTP2SESSION2(this, "handling origin frame");
^~~~~~~~~~~~~~~~~~~
make[1]: *** [/root/node/out/Release/obj.target/node_lib/src/node_http2.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../src/node_perf.cc: In function 'void node::performance::Init(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)':
../src/node_perf.cc:365:8: warning: variable 'state_ab' set but not used [-Wunused-but-set-variable]
auto state_ab = ArrayBuffer::New(isolate, state, sizeof(*state));
^~~~~~~~
rm ad16294d2e56dcf8094a61395a5f2db888bad43e.intermediate
make[1]: Leaving directory `/root/node/out'
make: *** [node] Error 2
This is present since v8.13.0, presumably since #22850. I haven't tried building other versions, just v8.13.0 and v8.16.0, the error wasn't present in v8.12.0.
This seems to fix the issue and makes the tests pass too:
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -1437,7 +1437,7 @@ void Http2Session::HandleOriginFrame(const nghttp2_frame* frame) {
Local<Context> context = env()->context();
Context::Scope context_scope(context);
- DEBUG_HTTP2SESSION2(this, "handling origin frame");
+ DEBUG_HTTP2SESSION(this, "handling origin frame");
nghttp2_extension ext = frame->ext;
nghttp2_ext_origin* origin = static_cast<nghttp2_ext_origin*>(ext.payload);