aklomp / base64

Fast Base64 stream encoder/decoder in C99, with SIMD acceleration
BSD 2-Clause "Simplified" License
865 stars 162 forks source link

Concurrent call interface “base64_decode” appear Segment error #101

Closed linju123455 closed 2 years ago

linju123455 commented 2 years ago

hello,i try to use 40 thread call "base64_decode" interface, when process a thread,appear segment error in this interface,but if i use Fewer threads,ex 6 or 8,it will not have any problems,Here is my call:

memset(raw_image_buffer_, 0, 5242880);
base64_decode(base64_data.data(), base64_data.size(), raw_image_buffer_, &base2image_size, 0);

The same picture I used,and I can ensure that the input pointer and length are valid,size is 682901,the “raw_imagebuffer” is A fixed memory , size is 5242880, memset before each call.