File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 ruby-version : ${{ matrix.ruby }}
3434 bundler-cache : true # 'bundle install' and cache
3535 - run : bundle exec rake
36+ env :
37+ MSGPACK_DEBUG : " true"
3638
3739 valgrind :
3840 runs-on : ubuntu-latest
5961 ruby-version : ${{ matrix.ruby }}
6062 bundler-cache : true # 'bundle install' and cache
6163 - run : bundle exec rake spec
64+ env :
65+ MSGPACK_DEBUG : " true"
6266
6367 head-versions :
6468 continue-on-error : true
7579 ruby-version : ${{ matrix.ruby }}
7680 bundler-cache : true # 'bundle install' and cache
7781 - run : bundle exec rake spec || echo "failed, but ignore it"
82+ env :
83+ MSGPACK_DEBUG : " true"
Original file line number Diff line number Diff line change 1414] )
1515append_cflags ( RbConfig ::CONFIG [ "debugflags" ] ) if RbConfig ::CONFIG [ "debugflags" ]
1616
17+ append_cflags ( "-DRUBY_DEBUG=1" ) if ENV [ "MSGPACK_DEBUG" ]
18+
1719if RUBY_VERSION . start_with? ( '3.0.' ) && RUBY_VERSION <= '3.0.5'
1820 # https://bugs.ruby-lang.org/issues/18772
1921 append_cflags ( "-DRB_ENC_INTERNED_STR_NULL_CHECK=1" )
Original file line number Diff line number Diff line change 1919#include "unpacker.h"
2020#include "rmem.h"
2121#include "extension_value_class.h"
22-
23- _Static_assert (
24- sizeof (msgpack_unpacker_stack_entry_t ) * MSGPACK_UNPACKER_STACK_CAPACITY <= MSGPACK_RMEM_PAGE_SIZE ,
25- "msgpack_unpacker_stack_entry_t is too big to fit MSGPACK_UNPACKER_STACK_CAPACITY in MSGPACK_RMEM_PAGE_SIZE"
26- );
22+ #include <assert.h>
2723
2824static int RAW_TYPE_STRING = 256 ;
2925static int RAW_TYPE_BINARY = 257 ;
@@ -41,6 +37,8 @@ static inline VALUE rb_hash_new_capa(long capa)
4137
4238void msgpack_unpacker_static_init (void )
4339{
40+ assert (sizeof (msgpack_unpacker_stack_entry_t ) * MSGPACK_UNPACKER_STACK_CAPACITY <= MSGPACK_RMEM_PAGE_SIZE );
41+
4442 msgpack_rmem_init (& s_stack_rmem );
4543
4644 s_call = rb_intern ("call" );
You can’t perform that action at this time.
0 commit comments