profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/stavro/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sean Stavropoulos stavro @Boulevard Los Angeles, CA https://joinblvd.com Cofounder & CTO of @Boulevard

stavro/arc 1104

:paperclip: Flexible file upload and attachment library for Elixir

stavro/arc_ecto 245

An integration with Arc and Ecto.

stavro/remodel 134

:necktie: An Elixir presenter package used to transform map structures. "ActiveModel::Serializer for Elixir"

stavro/snakes 21

:snake: Multiplayer "Snake" game using Ruby, MongoDB, WebSockets, and HTML canvas.

stavro/ecto_hstore 13

:no_entry_sign: (Deprecated) Ecto HStore compatibility

stavro/drakon-node-chat 9

A TCP chat server written in DRAKON-JavaScript

stavro/hello_master 9

Hello World implementation for Elixir Slave nodes

stavro/cayley-cookbook 4

Chef cookbook for the Cayley Graph Database.

stavro/titan-cookbook 3

TitanDB Graph Database Cookbook

Boulevard/promotion-demo 0

Example project using the Boulevard Client API

issue commentplv8/plv8

unexpected behavior with statement_timeout

Ah, that's a pretty peculiar case of SPI_execute with timeout. It seems like it's not covered. More than that after looking at the plpgsql code I have no idea how exactly they do it, as all the SPI_execute* functions are uninterruptible. And the only place where interrupts are processed is in CHECK_FOR_INTERRUPTS() which happens before and after execution, but not inside. I.e. fixing the error message is easy: just add CHECK_FOR_INTERRUPTS() after all the SPI calls. But how to actually make it respect the timeout is unclear.

jngbng

comment created time in 4 hours

issue closedplv8/plv8

Building PLV8 for postgresql 13. on Ubuntu 20.04 Failed. torque_generated_initializers

I used instructions https://plv8.github.io/ for do it. Ubuntu 20.04 Git g++ or clang++ Python 2 pkg-config libc++-dev libc++abi-dev libglib2.0-dev libtinfo5 ninja-build And etc... Latest build log:

cd build/v8 ; env CXXFLAGS=-fPIC CFLAGS=-fPIC ninja -C out.gn/x64.release v8_monolith
ninja: Entering directory `out.gn/x64.release'
[1/858] CXX obj/src/inspector/inspector/v8-value-utils.o
[2/858] CXX obj/src/inspector/inspector/v8-schema-agent-impl.o
[3/858] CXX obj/src/inspector/inspector/string-util.o
[4/858] CXX obj/src/inspector/inspector/v8-regex.o
[5/858] CXX obj/src/inspector/inspector/v8-stack-trace-impl.o
[6/858] CXX obj/src/inspector/inspector/test-interface.o
[7/858] CXX obj/src/inspector/inspector/custom-preview.o
[8/858] CXX obj/src/inspector/inspector/v8-console-agent-impl.o
[9/858] CXX obj/src/inspector/inspector/v8-runtime-agent-impl.o
[10/858] CXX obj/src/inspector/inspector/v8-profiler-agent-impl.o
[11/858] CXX obj/src/inspector/inspector/remote-object-id.o
[12/858] CXX obj/src/inspector/inspector/Protocol.o
[13/858] CXX obj/src/inspector/inspector/v8-console-message.o
[14/858] CXX obj/src/inspector/inspector/v8-console.o
[15/858] CXX obj/src/inspector/inspector/string-16.o
[16/858] STAMP obj/third_party/inspector_protocol/crdtp_platform.stamp
[17/858] CXX obj/third_party/inspector_protocol/crdtp/status.o
[18/858] STAMP obj/third_party/inspector_protocol/crdtp.stamp
[19/858] CXX obj/src/inspector/inspector/injected-script.o
[20/858] CC obj/third_party/zlib/zlib/deflate.o
[21/858] CC obj/third_party/zlib/zlib/gzclose.o
[22/858] CXX obj/src/inspector/inspector/Schema.o
[23/858] CC obj/third_party/zlib/zlib/gzlib.o
[24/858] CC obj/third_party/zlib/zlib/gzread.o
[25/858] CXX obj/src/inspector/inspector/search-util.o
[26/858] CC obj/third_party/zlib/zlib/gzwrite.o
[27/858] CC obj/third_party/zlib/zlib/infback.o
[28/858] CC obj/third_party/zlib/zlib/inffast.o
[29/858] CC obj/third_party/zlib/zlib/inftrees.o
[30/858] CC obj/third_party/zlib/zlib/trees.o
[31/858] CC obj/third_party/zlib/zlib/uncompr.o
[32/858] CC obj/third_party/zlib/zlib/zutil.o
[33/858] CC obj/third_party/zlib/zlib/compress.o
[34/858] CC obj/third_party/zlib/zlib/adler32.o
[35/858] CC obj/third_party/zlib/zlib/cpu_features.o
[36/858] CC obj/third_party/zlib/zlib_adler32_simd/adler32_simd.o
[37/858] STAMP obj/third_party/zlib/zlib_adler32_simd.stamp
[38/858] CC obj/third_party/zlib/zlib/crc32.o
[39/858] CC obj/third_party/zlib/zlib_inflate_chunk_simd/inffast_chunk.o
[40/858] CC obj/third_party/zlib/zlib_inflate_chunk_simd/inflate.o
[41/858] STAMP obj/third_party/zlib/zlib_inflate_chunk_simd.stamp
[42/858] CC obj/third_party/zlib/zlib_crc32_simd/crc32_simd.o
[43/858] STAMP obj/third_party/zlib/zlib_crc32_simd.stamp
[44/858] CXX obj/third_party/zlib/google/compression_utils_portable/compression_utils_portable.o
[45/858] CC obj/third_party/zlib/zlib_x86_simd/fill_window_sse.o
[46/858] CC obj/third_party/zlib/zlib_x86_simd/crc_folding.o
[47/858] STAMP obj/third_party/zlib/zlib_x86_simd.stamp
[48/858] AR obj/third_party/zlib/libchrome_zlib.a
[49/858] AR obj/third_party/zlib/google/libcompression_utils_portable.a
[50/858] CXX obj/src/inspector/inspector/Runtime.o
[51/858] CXX obj/src/inspector/inspector/Profiler.o
[52/858] CXX obj/src/inspector/inspector/Debugger.o
[53/858] CXX obj/src/inspector/inspector/value-mirror.o
[54/858] CXX obj/src/inspector/inspector/v8-debugger-agent-impl.o
[55/858] STAMP obj/src/inspector/inspector.stamp
[56/858] CXX obj/torque_base/torque-parser.o
[57/858] STAMP obj/torque_base.stamp
[58/858] LINK ./torque
[59/858] ACTION //:run_torque(//build/toolchain/linux:clang_x64)
[60/858] STAMP obj/run_torque.stamp
[61/858] STAMP obj/torque_generated_definitions.inputdeps.stamp
[62/858] STAMP obj/mksnapshot.inputdeps.stamp
[63/858] STAMP obj/torque_generated_initializers.inputdeps.stamp
[64/858] STAMP obj/v8_base_without_compiler.inputdeps.stamp
[65/858] STAMP obj/v8_compiler.inputdeps.stamp
[66/858] STAMP obj/v8_initializers.inputdeps.stamp
[67/858] CXX obj/mksnapshot/embedded-empty.o
[68/858] CXX obj/torque_generated_initializers/array-slice-tq-csa.o
**FAILED: obj/torque_generated_initializers/array-slice-tq-csa.o** 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_generated_initializers/array-slice-tq-csa.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=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=\"llvmorg-12-init-3492-ga1caa302-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=cc396d2ee91286924b377c2124b1efbcad7df8f2 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_CHECKS -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 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_ENABLE_CHECKS -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -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 -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti --sysroot=../../build/linux/debian_sid_amd64-sysroot -c gen/torque-generated/src/builtins/array-slice-tq-csa.cc -o obj/torque_generated_initializers/array-slice-tq-csa.o
**Killed**
**[69/858] CXX obj/torque_generated_definitions/class-verifiers-tq.o
FAILED: obj/torque_generated_definitions/class-verifiers-tq.o** 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_generated_definitions/class-verifiers-tq.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=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=\"llvmorg-12-init-3492-ga1caa302-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=cc396d2ee91286924b377c2124b1efbcad7df8f2 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_CHECKS -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 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_ENABLE_CHECKS -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -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 -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti --sysroot=../../build/linux/debian_sid_amd64-sysroot -c gen/torque-generated/class-verifiers-tq.cc -o obj/torque_generated_definitions/class-verifiers-tq.o
Killed
**[70/858] CXX obj/torque_generated_initializers/array-shift-tq-csa.o
FAILED: obj/torque_generated_initializers/array-shift-tq-csa.o** 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_generated_initializers/array-shift-tq-csa.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=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=\"llvmorg-12-init-3492-ga1caa302-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=cc396d2ee91286924b377c2124b1efbcad7df8f2 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_CHECKS -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 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_ENABLE_CHECKS -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -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 -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti --sysroot=../../build/linux/debian_sid_amd64-sysroot -c gen/torque-generated/src/builtins/array-shift-tq-csa.cc -o obj/torque_generated_initializers/array-shift-tq-csa.o
Killed
[71/858] CXX obj/torque_generated_definitions/factory-tq.o
[72/858] CXX obj/torque_generated_definitions/class-definitions-tq.o
[73/858] CXX obj/torque_generated_definitions/objects-printer-tq.o
[74/858] CXX obj/v8_init/setup-isolate-full.o
[75/858] CXX obj/torque_generated_initializers/array-reduce-tq-csa.o
[76/858] CXX obj/torque_generated_initializers/array-reduce-right-tq-csa.o
[77/858] CXX obj/torque_generated_initializers/array-reverse-tq-csa.o
ninja: build stopped: subcommand failed.

closed time in 19 hours

aam1go

issue commentplv8/plv8

Building PLV8 for postgresql 13. on Ubuntu 20.04 Failed. torque_generated_initializers

it was just intuition, from having compiled v8 thousands of times over the year.

if raising memory doesn't help (to a 1gb or higher), then I can help you get more information from the build

aam1go

comment created time in 19 hours

issue commentplv8/plv8

Building PLV8 for postgresql 13. on Ubuntu 20.04 Failed. torque_generated_initializers

@JerrySievert, I used recommended memory size by VMWare. it seems not enough. ) Thank you for help. What a specific pointer to this bad? 1 line Killed message?

aam1go

comment created time in 19 hours

issue commentplv8/plv8

Building PLV8 for postgresql 13. on Ubuntu 20.04 Failed. torque_generated_initializers

just out of curiosity, how much memory does the host you're compiling on have?

it looks like compilation is failing and the build is stopping because of that.

aam1go

comment created time in 19 hours

issue openedplv8/plv8

Building PLV8 for postgresql 13. on Ubuntu 20.04 Failed. torque_generated_initializers

I used instructions https://plv8.github.io/ for do it. Ubuntu 20.04 Git g++ or clang++ Python 2 pkg-config libc++-dev libc++abi-dev libglib2.0-dev libtinfo5 ninja-build And etc... Latest build log:

cd build/v8 ; env CXXFLAGS=-fPIC CFLAGS=-fPIC ninja -C out.gn/x64.release v8_monolith
ninja: Entering directory `out.gn/x64.release'
[1/858] CXX obj/src/inspector/inspector/v8-value-utils.o
[2/858] CXX obj/src/inspector/inspector/v8-schema-agent-impl.o
[3/858] CXX obj/src/inspector/inspector/string-util.o
[4/858] CXX obj/src/inspector/inspector/v8-regex.o
[5/858] CXX obj/src/inspector/inspector/v8-stack-trace-impl.o
[6/858] CXX obj/src/inspector/inspector/test-interface.o
[7/858] CXX obj/src/inspector/inspector/custom-preview.o
[8/858] CXX obj/src/inspector/inspector/v8-console-agent-impl.o
[9/858] CXX obj/src/inspector/inspector/v8-runtime-agent-impl.o
[10/858] CXX obj/src/inspector/inspector/v8-profiler-agent-impl.o
[11/858] CXX obj/src/inspector/inspector/remote-object-id.o
[12/858] CXX obj/src/inspector/inspector/Protocol.o
[13/858] CXX obj/src/inspector/inspector/v8-console-message.o
[14/858] CXX obj/src/inspector/inspector/v8-console.o
[15/858] CXX obj/src/inspector/inspector/string-16.o
[16/858] STAMP obj/third_party/inspector_protocol/crdtp_platform.stamp
[17/858] CXX obj/third_party/inspector_protocol/crdtp/status.o
[18/858] STAMP obj/third_party/inspector_protocol/crdtp.stamp
[19/858] CXX obj/src/inspector/inspector/injected-script.o
[20/858] CC obj/third_party/zlib/zlib/deflate.o
[21/858] CC obj/third_party/zlib/zlib/gzclose.o
[22/858] CXX obj/src/inspector/inspector/Schema.o
[23/858] CC obj/third_party/zlib/zlib/gzlib.o
[24/858] CC obj/third_party/zlib/zlib/gzread.o
[25/858] CXX obj/src/inspector/inspector/search-util.o
[26/858] CC obj/third_party/zlib/zlib/gzwrite.o
[27/858] CC obj/third_party/zlib/zlib/infback.o
[28/858] CC obj/third_party/zlib/zlib/inffast.o
[29/858] CC obj/third_party/zlib/zlib/inftrees.o
[30/858] CC obj/third_party/zlib/zlib/trees.o
[31/858] CC obj/third_party/zlib/zlib/uncompr.o
[32/858] CC obj/third_party/zlib/zlib/zutil.o
[33/858] CC obj/third_party/zlib/zlib/compress.o
[34/858] CC obj/third_party/zlib/zlib/adler32.o
[35/858] CC obj/third_party/zlib/zlib/cpu_features.o
[36/858] CC obj/third_party/zlib/zlib_adler32_simd/adler32_simd.o
[37/858] STAMP obj/third_party/zlib/zlib_adler32_simd.stamp
[38/858] CC obj/third_party/zlib/zlib/crc32.o
[39/858] CC obj/third_party/zlib/zlib_inflate_chunk_simd/inffast_chunk.o
[40/858] CC obj/third_party/zlib/zlib_inflate_chunk_simd/inflate.o
[41/858] STAMP obj/third_party/zlib/zlib_inflate_chunk_simd.stamp
[42/858] CC obj/third_party/zlib/zlib_crc32_simd/crc32_simd.o
[43/858] STAMP obj/third_party/zlib/zlib_crc32_simd.stamp
[44/858] CXX obj/third_party/zlib/google/compression_utils_portable/compression_utils_portable.o
[45/858] CC obj/third_party/zlib/zlib_x86_simd/fill_window_sse.o
[46/858] CC obj/third_party/zlib/zlib_x86_simd/crc_folding.o
[47/858] STAMP obj/third_party/zlib/zlib_x86_simd.stamp
[48/858] AR obj/third_party/zlib/libchrome_zlib.a
[49/858] AR obj/third_party/zlib/google/libcompression_utils_portable.a
[50/858] CXX obj/src/inspector/inspector/Runtime.o
[51/858] CXX obj/src/inspector/inspector/Profiler.o
[52/858] CXX obj/src/inspector/inspector/Debugger.o
[53/858] CXX obj/src/inspector/inspector/value-mirror.o
[54/858] CXX obj/src/inspector/inspector/v8-debugger-agent-impl.o
[55/858] STAMP obj/src/inspector/inspector.stamp
[56/858] CXX obj/torque_base/torque-parser.o
[57/858] STAMP obj/torque_base.stamp
[58/858] LINK ./torque
[59/858] ACTION //:run_torque(//build/toolchain/linux:clang_x64)
[60/858] STAMP obj/run_torque.stamp
[61/858] STAMP obj/torque_generated_definitions.inputdeps.stamp
[62/858] STAMP obj/mksnapshot.inputdeps.stamp
[63/858] STAMP obj/torque_generated_initializers.inputdeps.stamp
[64/858] STAMP obj/v8_base_without_compiler.inputdeps.stamp
[65/858] STAMP obj/v8_compiler.inputdeps.stamp
[66/858] STAMP obj/v8_initializers.inputdeps.stamp
[67/858] CXX obj/mksnapshot/embedded-empty.o
[68/858] CXX obj/torque_generated_initializers/array-slice-tq-csa.o
**FAILED: obj/torque_generated_initializers/array-slice-tq-csa.o** 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_generated_initializers/array-slice-tq-csa.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=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=\"llvmorg-12-init-3492-ga1caa302-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=cc396d2ee91286924b377c2124b1efbcad7df8f2 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_CHECKS -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 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_ENABLE_CHECKS -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -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 -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti --sysroot=../../build/linux/debian_sid_amd64-sysroot -c gen/torque-generated/src/builtins/array-slice-tq-csa.cc -o obj/torque_generated_initializers/array-slice-tq-csa.o
**Killed**
**[69/858] CXX obj/torque_generated_definitions/class-verifiers-tq.o
FAILED: obj/torque_generated_definitions/class-verifiers-tq.o** 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_generated_definitions/class-verifiers-tq.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=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=\"llvmorg-12-init-3492-ga1caa302-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=cc396d2ee91286924b377c2124b1efbcad7df8f2 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_CHECKS -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 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_ENABLE_CHECKS -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -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 -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti --sysroot=../../build/linux/debian_sid_amd64-sysroot -c gen/torque-generated/class-verifiers-tq.cc -o obj/torque_generated_definitions/class-verifiers-tq.o
Killed
**[70/858] CXX obj/torque_generated_initializers/array-shift-tq-csa.o
FAILED: obj/torque_generated_initializers/array-shift-tq-csa.o** 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_generated_initializers/array-shift-tq-csa.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=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=\"llvmorg-12-init-3492-ga1caa302-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=cc396d2ee91286924b377c2124b1efbcad7df8f2 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DENABLE_HANDLE_ZAPPING -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_CHECKS -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 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_ENABLE_CHECKS -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -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 -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-string-concatenation -Wmax-tokens -fno-omit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -gsplit-dwarf -ggnu-pubnames -ftrivial-auto-var-init=pattern -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fvisibility=default -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti --sysroot=../../build/linux/debian_sid_amd64-sysroot -c gen/torque-generated/src/builtins/array-shift-tq-csa.cc -o obj/torque_generated_initializers/array-shift-tq-csa.o
Killed
[71/858] CXX obj/torque_generated_definitions/factory-tq.o
[72/858] CXX obj/torque_generated_definitions/class-definitions-tq.o
[73/858] CXX obj/torque_generated_definitions/objects-printer-tq.o
[74/858] CXX obj/v8_init/setup-isolate-full.o
[75/858] CXX obj/torque_generated_initializers/array-reduce-tq-csa.o
[76/858] CXX obj/torque_generated_initializers/array-reduce-right-tq-csa.o
[77/858] CXX obj/torque_generated_initializers/array-reverse-tq-csa.o
ninja: build stopped: subcommand failed.

created time in 19 hours

startedsanojian/cellauto

started time in 21 hours

issue commentplv8/plv8

unexpected behavior with statement_timeout

@JerrySievert I think it's fixed in #441 too, but may need to add a specific tests for it (different compile flags). I have also added timeouts to compilation phase, otherwise function compile was uninterruptable.

jngbng

comment created time in 2 days

pull request commentplv8/plv8

fix plv8_reset isolate disposal

close in favor of #441

pkit

comment created time in 2 days

PR closed plv8/plv8

fix plv8_reset isolate disposal wip

some of my assumption on how stuff is disposed off were incorrect fixed it

Isolate::Dispose() uses pretty complex logic that deletes stuff in particular order And the main problem: it deletes the array allocator, which means managing allocator lifecycle externally is kinda prohibited Got SEGFAULTs in pretty convoluted cases, which are hard to reproduce with a simple test...

+0 -7

2 comments

1 changed file

pkit

pr closed time in 2 days

pull request commentplv8/plv8

backport of my branches into upstream

Added some docs, may need to add more...

pkit

comment created time in 3 days

pull request commentplv8/plv8

backport of my branches into upstream

awesome! will take a look as soon as I get a free moment. thanks @pkit!

pkit

comment created time in 3 days

issue commentplv8/plv8

Compilation error plv8.cc:220:18: error: ‘oid_hash’ was not declared in this scope

correct. this will not work.

postgres 13 was not supported until 2.3.15, as the release introduced breaking changes. switch over to 2.3.15 and you should compile fine.

sanindd

comment created time in 3 days

issue closedplv8/plv8

Compilation error plv8.cc:220:18: error: ‘oid_hash’ was not declared in this scope

Hi, I'm trying to collect plv8 v2.3.11 for PostgreSQL 13.3 and get a compile error. Use: CentOS Linux release 7.9.2009, gcc (GCC) 7.3.1, g++ (GCC) 7.3.1

cd build/v8 ; env CXXFLAGS=-fPIC CFLAGS=-fPIC ninja -C out.gn/x64.release d8 ninja: Entering directoryout.gn/x64.release' [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [665/665] LINK ./d8 sed -e 's/^#undef PLV8_VERSION/#define PLV8_VERSION "2.3.11"/' plv8_config.h.in > plv8_config.h g++ -Wall -O2 -std=c++11 -fno-rtti -Ibuild/v8/include -Ibuild/v8 -std=c++11 -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -fPIC -c -o plv8.o plv8.cc plv8.cc: In function ‘void _PG_init()’: plv8.cc:220:18: error: ‘oid_hash’ was not declared in this scope hash_ctl.hash = oid_hash; ^~~~~~~~ plv8.cc:220:18: note: suggested alternative: ‘uuid_hash’ hash_ctl.hash = oid_hash; ^~~~~~~~ uuid_hash plv8.cc: In function ‘Datum CallFunction(FunctionCallInfo, plv8_exec_env*, int, plv8_type*, plv8_type*)’: plv8.cc:597:30: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘arg’; did you mean ‘args’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~ args plv8.cc:597:46: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘argnull’; did you mean ‘isnull’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~~~~~ isnull plv8.cc: In function ‘Datum CallSRFunction(FunctionCallInfo, plv8_exec_env*, int, plv8_type*, plv8_type*)’: plv8.cc:694:29: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘arg’; did you mean ‘args’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~ args plv8.cc:694:45: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘argnull’; did you mean ‘isnull’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~~~~~ isnull plv8.cc: In function ‘Datum common_pl_call_validator(FunctionCallInfo, Dialect)’: plv8.cc:888:25: error: ‘OPAQUEOID’ was not declared in this scope (proc->prorettype == OPAQUEOID && proc->pronargs == 0)) ^~~~~~~~~ plv8.cc:888:25: note: suggested alternative: ‘OPEROID’ (proc->prorettype == OPAQUEOID && proc->pronargs == 0)) ^~~~~~~~~ OPEROID plv8.cc: In function ‘v8::Localv8::Function find_js_function(Oid)’: plv8.cc:1387:21: error: ‘HeapTupleGetOid’ was not declared in this scope Oid langtupoid = HeapTupleGetOid(tuple); ^~~~~~~~~~~~~~~ plv8.cc:1387:21: note: suggested alternative: ‘HeapTupleData’ Oid langtupoid = HeapTupleGetOid(tuple); ^~~~~~~~~~~~~~~ HeapTupleData plv8.cc: In function ‘void GetGlobalContext(v8::Persistentv8::Context&)’: plv8.cc:1514:4: error: ‘FunctionCallInfoData’ was not declared in this scope FunctionCallInfoData fake_fcinfo; ^~~~~~~~~~~~~~~~~~~~ plv8.cc:1514:4: note: suggested alternative: ‘FunctionCallInfoBaseData’ FunctionCallInfoData fake_fcinfo; ^~~~~~~~~~~~~~~~~~~~ FunctionCallInfoBaseData In file included from /usr/pgsql-13/include/server/postgres.h:46:0, from plv8.h:19, from plv8.cc:8: plv8.cc:1525:13: error: ‘fake_fcinfo’ was not declared in this scope MemSet(&fake_fcinfo, 0, sizeof(fake_fcinfo)); ^ /usr/pgsql-13/include/server/c.h:987:31: note: in definition of macro ‘MemSet’ void *_vstart = (void *) (start);
^~~~~ plv8.cc:1525:13: note: suggested alternative: ‘fmgr_info’ MemSet(&fake_fcinfo, 0, sizeof(fake_fcinfo)); ^ /usr/pgsql-13/include/server/c.h:987:31: note: in definition of macro ‘MemSet’ void *_vstart = (void *) (start);
^~~~~ plv8.cc:1527:5: error: ‘fake_fcinfo’ was not declared in this scope fake_fcinfo.flinfo = &flinfo; ^~~~~~~~~~~ plv8.cc:1527:5: note: suggested alternative: ‘fmgr_info’ fake_fcinfo.flinfo = &flinfo; ^~~~~~~~~~~ fmgr_info make: *** [Makefile.shared:90: plv8.o] Error 1`

closed time in 3 days

sanindd

pull request commentplv8/plv8

backport of my branches into upstream

probably needs documentation updates too

pkit

comment created time in 3 days

Pull request review commentplv8/plv8

backport of my branches into upstream

 CreateIsolate(plv8_context *context) { 	isolate->SetOOMErrorHandler(OOMErrorHandler); 	isolate->AddGCEpilogueCallback(GCEpilogueCallback); 	isolate->AddNearHeapLimitCallback(NearHeapLimitHandler, NULL);-	context->isolate = isolate;-	context->array_buffer_allocator = params.array_buffer_allocator;+	if (plv8_max_eval_size >= 0)+		isolate->SetModifyCodeGenerationFromStringsCallback(CodeGenCallback);+	runtime->isolate = isolate;+	runtime->array_buffer_allocator = params.array_buffer_allocator;+}++static bool+user_context_check_hook(char **newvalue, void **extra, GucSource source)+{+	if (newvalue != nullptr && *newvalue != nullptr && strnlen(*newvalue, NAMEDATALEN) == NAMEDATALEN)+	{+		GUC_check_errdetail("user context id is too long, max %d characters", (NAMEDATALEN - 1));+		return false;+	}+	else if (Isolate::GetCurrent() != nullptr && Isolate::GetCurrent()->IsInUse())+	{+		GUC_check_errdetail("cannot set context from inside a running transaction");+		return false;+	}+	return true; }  void _PG_init(void) { 	HASHCTL    hash_ctl = { 0 }; -	hash_ctl.keysize = sizeof(Oid);+	hash_ctl.keysize = sizeof(plv8_proc_key); 	hash_ctl.entrysize = sizeof(plv8_proc_cache);-	hash_ctl.hash = oid_hash; 	plv8_proc_cache_hash = hash_create("PLv8 Procedures", 32,-									   &hash_ctl, HASH_ELEM | HASH_FUNCTION);--	DefineCustomStringVariable("plv8.start_proc",-							   gettext_noop("PLV8 function to run once when PLV8 is first used."),-							   NULL,-							   &plv8_start_proc,-							   NULL,-							   PGC_USERSET, 0,+									   &hash_ctl, HASH_ELEM | HASH_BLOBS);++	config_generic *guc_value;++#define BOOT_PROC_VAR "plv8.boot_proc"+	guc_value = plv8_find_option(BOOT_PROC_VAR);+	if (guc_value != NULL) {+		plv8_boot_proc = plv8_string_option(guc_value);+	} else {+		DefineCustomStringVariable(BOOT_PROC_VAR,+								   gettext_noop("PLV8 function to run once when any context is first used."),+								   gettext_noop("Superuser only, if set disables plv8.start_proc"),+								   &plv8_boot_proc,+								   NULL,+								   PGC_SUSET, GUC_SUPERUSER_ONLY, #if PG_VERSION_NUM >= 90100-							   NULL,+								   NULL, #endif-							   NULL,-							   NULL);--	DefineCustomStringVariable("plv8.icu_data",-							   gettext_noop("ICU data file directory."),-							   NULL,-							   &plv8_icu_data,-							   NULL,-							   PGC_USERSET, 0,+								   NULL,+								   NULL);+	}+#undef BOOT_PROC_VAR++#define START_PROC_VAR "plv8.start_proc"+	guc_value = plv8_find_option(START_PROC_VAR);+	if (guc_value != NULL) {+		plv8_start_proc = plv8_string_option(guc_value);+	} else {+		DefineCustomStringVariable(START_PROC_VAR,+								   gettext_noop("PLV8 function to run once when PLV8 is first used."),+								   NULL,+								   &plv8_start_proc,+								   NULL,+								   PGC_USERSET, 0, #if PG_VERSION_NUM >= 90100-							   NULL,+								   NULL, #endif-							   NULL,-							   NULL);--	DefineCustomStringVariable("plv8.v8_flags",-							   gettext_noop("V8 engine initialization flags (e.g. --harmony for all current harmony features)."),-							   NULL,-							   &plv8_v8_flags,-							   NULL,-							   PGC_USERSET, 0,+								   NULL,+								   NULL);+	}+#undef START_PROC_VAR++#define ICU_DATA_VAR "plv8.icu_data"+	guc_value = plv8_find_option(ICU_DATA_VAR);+	if (guc_value != NULL) {+		plv8_icu_data = plv8_string_option(guc_value);+	} else {+		DefineCustomStringVariable(ICU_DATA_VAR,+								   gettext_noop("ICU data file directory."),+								   NULL,+								   &plv8_icu_data,+								   NULL,+								   PGC_SUSET, 0,+#if PG_VERSION_NUM >= 90100+								   NULL,+#endif+								   NULL,+								   NULL);+	}+#undef ICU_DATA_VAR++#define V8_FLAGS_VAR "plv8.v8_flags"+	guc_value = plv8_find_option(V8_FLAGS_VAR);+	if (guc_value != NULL) {+		plv8_v8_flags = plv8_string_option(guc_value);+	} else {+		DefineCustomStringVariable(V8_FLAGS_VAR,+								   gettext_noop(+										   "V8 engine initialization flags (e.g. --harmony for all current harmony features)."),+								   NULL,+								   &plv8_v8_flags,+								   NULL,+								   PGC_SUSET, 0, #if PG_VERSION_NUM >= 90100-							   NULL,+								   NULL, #endif-							   NULL,-							   NULL);--	DefineCustomIntVariable("plv8.debugger_port",-							gettext_noop("V8 remote debug port."),-							gettext_noop("The default value is 35432.  "-										 "This is effective only if PLV8 is built with ENABLE_DEBUGGER_SUPPORT."),-							&plv8_debugger_port,-							35432, 0, 65536,-							PGC_USERSET, 0,+								   NULL,+								   NULL);+	}+#undef V8_FLAGS_VAR++#define DEBUGGER_PORT_VAR "plv8.debugger_port"+	guc_value = plv8_find_option(DEBUGGER_PORT_VAR);+	if (guc_value != NULL) {+		plv8_debugger_port = plv8_int_option(guc_value);+	} else {+		DefineCustomIntVariable(DEBUGGER_PORT_VAR,+								gettext_noop("V8 remote debug port."),+								gettext_noop("The default value is 35432.  "+											 "This is effective only if PLV8 is built with ENABLE_DEBUGGER_SUPPORT."),+								&plv8_debugger_port,+								35432, 0, 65536,+								PGC_USERSET, 0, #if PG_VERSION_NUM >= 90100-							NULL,+								NULL, #endif-							NULL,-							NULL);+								NULL,+								NULL);+	}+#undef DEBUGGER_PORT_VAR  #ifdef EXECUTION_TIMEOUT-	DefineCustomIntVariable("plv8.execution_timeout",-							gettext_noop("V8 execution timeout."),-							gettext_noop("The default value is 300 seconds.  "-										 "This allows you to override the default execution timeout."),-							&plv8_execution_timeout,-							300, 1, 65536,-							PGC_USERSET, 0,+#define EXECUTION_TIMEOUT_VAR "plv8.execution_timeout"+	guc_value = plv8_find_option(EXECUTION_TIMEOUT_VAR);+	if (guc_value != NULL) {+		plv8_execution_timeout = plv8_int_option(guc_value);+	} else {+		DefineCustomIntVariable(EXECUTION_TIMEOUT_VAR,+								gettext_noop("V8 execution timeout."),+								gettext_noop("The default value is 300 seconds.  "+											 "This allows you to override the default execution timeout."),+								&plv8_execution_timeout,+								300, 1, 65536,+								PGC_SUSET, 0,+#if PG_VERSION_NUM >= 90100+								NULL,+#endif+								NULL,+								NULL);+	}+#undef EXECUTION_TIMEOUT_VAR+#endif++#define MEMORY_LIMIT_VAR "plv8.memory_limit"+	guc_value = plv8_find_option(MEMORY_LIMIT_VAR);+	if (guc_value != NULL) {+		plv8_memory_limit = plv8_int_option(guc_value);+	} else {+		DefineCustomIntVariable(MEMORY_LIMIT_VAR,+								gettext_noop("Per-isolate memory limit in MBytes"),+								gettext_noop("The default value is 256 MB"),+								(int *) &plv8_memory_limit,+								256, 256, 3096, // hardcoded v8 limits for isolates+								PGC_SUSET, 0, #if PG_VERSION_NUM >= 90100-							NULL,+								NULL, #endif-							NULL,-							NULL);+								NULL,+								NULL);+	}+#undef MEMORY_LIMIT_VAR++#define USER_CONTEXT_VAR "plv8.context"+	guc_value = plv8_find_option(USER_CONTEXT_VAR);+	if (guc_value != NULL) {+		plv8_user_context = plv8_string_option(guc_value);+	} else {+		DefineCustomStringVariable(USER_CONTEXT_VAR,+								   gettext_noop("User-defined context id"),+								   gettext_noop("Can be used to set up different execution contexts"),+								   &plv8_user_context,+								   nullptr,+								   PGC_USERSET, 0,+#if PG_VERSION_NUM >= 90100+								   &user_context_check_hook,+#endif+								   nullptr,+								   nullptr);+	}+#undef USER_CONTEXT_VAR++#define USER_CONTEXT_SIZE_VAR "plv8.context_cache_size"+	guc_value = plv8_find_option(USER_CONTEXT_SIZE_VAR);+	if (guc_value != NULL) {+		plv8_context_cache_size = plv8_int_option(guc_value);+	} else {+		DefineCustomIntVariable(USER_CONTEXT_SIZE_VAR,+								gettext_noop("Number of live contexts in user context cache"),+								gettext_noop("The default is 8, which means 10 contexts overall (+ default + compile)."+											 "The cache will evict and destroy contexts over this number (using LRU)"),+								(int *)&plv8_context_cache_size,+								8, 0, 64,+								PGC_SUSET, 0,+#if PG_VERSION_NUM >= 90100+								NULL, #endif+								NULL,+								NULL);+	}+#undef USER_CONTEXT_SIZE_VAR -	DefineCustomIntVariable("plv8.memory_limit",-							gettext_noop("Per-isolate memory limit in MBytes"),-							gettext_noop("The default value is 256 MB"),-							(int*)&plv8_memory_limit,-							256, 256, 3096, // hardcoded v8 limits for isolates-							PGC_SUSET, 0,+#define MAX_EVAL_SIZE_VAR "plv8.max_eval_size"+	guc_value = plv8_find_option(MAX_EVAL_SIZE_VAR);+	if (guc_value != NULL) {+		plv8_max_eval_size = plv8_int_option(guc_value);+	} else {+		DefineCustomIntVariable(MAX_EVAL_SIZE_VAR,+								gettext_noop("Max size in bytes for code to eval()"),+								gettext_noop("The default is 2MB, setting to 0 disables eval() completely!"

Probably need to change it to -1 by default for upstream to maintain existing behavior...

pkit

comment created time in 3 days

PR closed plv8/plv8

Upgrade to v8 8.8 and improve some features
  • upgrade to v8 8.8.278.14
  • improve timeouts, add timeout to script compilation
  • improve OOM handling
  • add fixes for common exploits
+852 -281

20 comments

14 changed files

pkit

pr closed time in 3 days

pull request commentplv8/plv8

Upgrade to v8 8.8 and improve some features

closing in favor of #441

pkit

comment created time in 3 days

PR opened plv8/plv8

backport of my branches into upstream
  • new V8 version
  • user context support
  • eval() size limits support
  • running script support
  • various small fixes
+1795 -616

0 comment

19 changed files

pr created time in 3 days

issue openedplv8/plv8

Compilation error plv8.cc:220:18: error: ‘oid_hash’ was not declared in this scope

Hi, I'm trying to collect plv8 for PostgreSQL 13.3 and get a compile error. Use: CentOS Linux release 7.9.2009, gcc (GCC) 7.3.1, g++ (GCC) 7.3.1

cd build/v8 ; env CXXFLAGS=-fPIC CFLAGS=-fPIC ninja -C out.gn/x64.release d8 ninja: Entering directoryout.gn/x64.release' [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [1/1] Regenerating ninja files [665/665] LINK ./d8 sed -e 's/^#undef PLV8_VERSION/#define PLV8_VERSION "2.3.11"/' plv8_config.h.in > plv8_config.h g++ -Wall -O2 -std=c++11 -fno-rtti -Ibuild/v8/include -Ibuild/v8 -std=c++11 -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -fPIC -c -o plv8.o plv8.cc plv8.cc: In function ‘void _PG_init()’: plv8.cc:220:18: error: ‘oid_hash’ was not declared in this scope hash_ctl.hash = oid_hash; ^~~~~~~~ plv8.cc:220:18: note: suggested alternative: ‘uuid_hash’ hash_ctl.hash = oid_hash; ^~~~~~~~ uuid_hash plv8.cc: In function ‘Datum CallFunction(FunctionCallInfo, plv8_exec_env*, int, plv8_type*, plv8_type*)’: plv8.cc:597:30: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘arg’; did you mean ‘args’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~ args plv8.cc:597:46: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘argnull’; did you mean ‘isnull’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~~~~~ isnull plv8.cc: In function ‘Datum CallSRFunction(FunctionCallInfo, plv8_exec_env*, int, plv8_type*, plv8_type*)’: plv8.cc:694:29: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘arg’; did you mean ‘args’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~ args plv8.cc:694:45: error: ‘struct FunctionCallInfoBaseData’ has no member named ‘argnull’; did you mean ‘isnull’? args[i] = ToValue(fcinfo->arg[i], fcinfo->argnull[i], &argtypes[i]); ^~~~~~~ isnull plv8.cc: In function ‘Datum common_pl_call_validator(FunctionCallInfo, Dialect)’: plv8.cc:888:25: error: ‘OPAQUEOID’ was not declared in this scope (proc->prorettype == OPAQUEOID && proc->pronargs == 0)) ^~~~~~~~~ plv8.cc:888:25: note: suggested alternative: ‘OPEROID’ (proc->prorettype == OPAQUEOID && proc->pronargs == 0)) ^~~~~~~~~ OPEROID plv8.cc: In function ‘v8::Localv8::Function find_js_function(Oid)’: plv8.cc:1387:21: error: ‘HeapTupleGetOid’ was not declared in this scope Oid langtupoid = HeapTupleGetOid(tuple); ^~~~~~~~~~~~~~~ plv8.cc:1387:21: note: suggested alternative: ‘HeapTupleData’ Oid langtupoid = HeapTupleGetOid(tuple); ^~~~~~~~~~~~~~~ HeapTupleData plv8.cc: In function ‘void GetGlobalContext(v8::Persistentv8::Context&)’: plv8.cc:1514:4: error: ‘FunctionCallInfoData’ was not declared in this scope FunctionCallInfoData fake_fcinfo; ^~~~~~~~~~~~~~~~~~~~ plv8.cc:1514:4: note: suggested alternative: ‘FunctionCallInfoBaseData’ FunctionCallInfoData fake_fcinfo; ^~~~~~~~~~~~~~~~~~~~ FunctionCallInfoBaseData In file included from /usr/pgsql-13/include/server/postgres.h:46:0, from plv8.h:19, from plv8.cc:8: plv8.cc:1525:13: error: ‘fake_fcinfo’ was not declared in this scope MemSet(&fake_fcinfo, 0, sizeof(fake_fcinfo)); ^ /usr/pgsql-13/include/server/c.h:987:31: note: in definition of macro ‘MemSet’ void *_vstart = (void *) (start);
^~~~~ plv8.cc:1525:13: note: suggested alternative: ‘fmgr_info’ MemSet(&fake_fcinfo, 0, sizeof(fake_fcinfo)); ^ /usr/pgsql-13/include/server/c.h:987:31: note: in definition of macro ‘MemSet’ void *_vstart = (void *) (start);
^~~~~ plv8.cc:1527:5: error: ‘fake_fcinfo’ was not declared in this scope fake_fcinfo.flinfo = &flinfo; ^~~~~~~~~~~ plv8.cc:1527:5: note: suggested alternative: ‘fmgr_info’ fake_fcinfo.flinfo = &flinfo; ^~~~~~~~~~~ fmgr_info make: *** [Makefile.shared:90: plv8.o] Error 1`

created time in 3 days

issue commentplv8/plv8

BigInt parser bug in v8 can lead to DoS

@pkit's contributions have been amazing, and are always welcomed :)

@JamesInform - this bug will be closed when it get remediated along with a version, so you should get informed when it happens.

pkit

comment created time in 4 days

issue commentplv8/plv8

BigInt parser bug in v8 can lead to DoS

@JamesInform there are much more problems that you will need to solve then... Unfortunately v8 is highly unstable in OOM conditions, even if it's an OOM in isolate only. I'm usually trying to contribute those back to plv8 but it needs some effort... @JerrySievert Hoctail prod, staging, etc. envs run on 8.8.278.14 it is pretty stable right now. But never tested on Mac though (I don't have the hardware).

pkit

comment created time in 4 days

issue commentplv8/plv8

BigInt parser bug in v8 can lead to DoS

likely 3.1, since v8 changes so much between even somewhat minor versions, a lot of code in plv8 needs to be updated to work with newer versions. like node, plv8 versions track those major changes and stay within a select number of v8 versions. if it is something that I can back port, I will though.

pkit

comment created time in 4 days

issue commentplv8/plv8

BigInt parser bug in v8 can lead to DoS

Thanks Jerry.

Is there any vague timeline for raising version to 8.7.76 or beyond? Will this be in 3.1? In my database, users can execute literally any plv8 script they like. So I cannot prevent this issue to occur, if users are doing something nasty.

pkit

comment created time in 4 days

issue commentplv8/plv8

BigInt parser bug in v8 can lead to DoS

it does. 3.0 only moved to 8.6.405. it would need to move to 8.7.76 to eliminate it completely.

pkit

comment created time in 4 days

issue commentplv8/plv8

BigInt parser bug in v8 can lead to DoS

Does this bug still exist in the current 3.0 Release?

Just wondering because this bug is still open.

pkit

comment created time in 4 days

startedstavro/arc

started time in 4 days

startedstavro/arc

started time in 5 days

startedstavro/arc

started time in 5 days