pglite
pglite copied to clipboard
[BUG] RuntimeError: Out of bounds memory access (evaluating 'this.mod._pg_initdb()')
Using PgLite 0.2.16 and Bun 1.2.2, sometime fails in CI with:
1 | import{a as he}from"./chunk-IB2OPID6.js";import{e as De,h as ze,i as ge,j as fe,k as xe,l as Me,m as Se,n as Le,o as pe,p as Ne,q as ve,r as Ee,s as we,t as ye,u as Be,v as Ge}from"./chunk-QQ5ITYQ4.js";import{a as Oe,b as be,c as le,d as B,e as _e}from"./chunk-WGR4JCLS.js";import"./chunk-STOZMFXW.js";import{c as Re,d as U,e as w,f as I,g as F,h as Q,j as C}from"./chunk-BTBUZ646.js";C();C();C();var Qe=new Error("timeout while waiting for mutex to become available"),Ye=new Error("mutex already locked"),Xe=new Error("request for lock canceled"),He=function(e,t,r,a){function o(s){return s instanceof r?s:new r(function(l){l(s)})}return new(r||(r=Promise))(function(s,l){function _(p){try{m(a.next(p))}catch(d){l(d)}}function n(p){try{m(a.throw(p))}catch(d){l(d)}}function m(p){p.done?s(p.value):o(p.value).then(_,n)}m((a=a.apply(e,t||[])).next())})},de=class{constructor(t,r=Xe){this._value=t,this._cancelError=r,this._weightedQueues=[],this._weightedWaiters=[]}acquire(t=1){if(t<=0)throw new Error(`invalid weight ${t}:
2 | `));if(!e)return null;FS_stdin_getChar_buffer=intArrayFromString(e,!0)}return FS_stdin_getChar_buffer.shift()},TTY={ttys:[],init(){},shutdown(){},register(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,a,o){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var s=0,l=0;l<a;l++){var _;try{_=e.tty.ops.get_char(e.tty)}catch{throw new FS.ErrnoError(29)}if(_===void 0&&s===0)throw new FS.ErrnoError(6);if(_==null)break;s++,t[r+l]=_}return s&&(e.node.atime=Date.now()),s},write(e,t,r,a,o){if(!e.tty||!e.tty.ops.put_char)throw new FS.ErrnoError(60);try{for(var s=0;s<a;s++)e.tty.ops.put_char(e.tty,t[r+s])}catch{throw new FS.ErrnoError(29)}return a&&(e.node.mtime=e.node.ctime=Date.now()),s}},default_tty_ops:{get_char(e){return FS_stdin_getChar()},put_char(e,t){t===null||t===10?(out(UTF8ArrayToStrin
3 | ${_}`),0}},__dlopen_js=e=>dlopenInternal(e,{loadAsync:!1});__dlopen_js.sig="pp";var __dlsym_js=(e,t,r)=>{t=UTF8ToString(t);var a,o,s=LDSO.loadedLibsByHandle[e];if(!s.exports.hasOwnProperty(t)||s.exports[t].stub)return dlSetError(`Tried to lookup unknown symbol "${t}" in dynamic lib: ${s.name}`),0;if(o=Object.keys(s.exports).indexOf(t),a=s.exports[t],typeof a=="function"){var l=getFunctionAddress(a);l?a=l:(a=addFunction(a,a.sig),HEAPU32[r>>2]=o)}return a};__dlsym_js.sig="pppp";var __emscripten_memcpy_js=(e,t,r)=>HEAPU8.copyWithin(e,t,t+r);__emscripten_memcpy_js.sig="vppp";var runtimeKeepaliveCounter=0,__emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";var __emscripten_system=e=>{if(ENVIRONMENT_IS_NODE){if(!e)return 1;var t=UTF8ToString(e);if(!t.length)return 0;var r=require("child_process"),a=r.spawnSync(t,[],{shell:!0,stdio:"inherit"}),o=(l,_)=>l<<8|_;if(a.status===null){var s=l=>{switch(l){case"SIGHUP":return 1;case"SIGQUIT":retu
RuntimeError: Out of bounds memory access (evaluating 'this.mod._pg_initdb()')
at <anonymous> (/home/runner/work/typescript/typescript/node_modules/@electric-sql/pglite/dist/index.js:3:243412)
Seems a clone of https://github.com/electric-sql/pglite/issues/339 ?
H @esciullo is this still an issue with the 0.3.0 version?
Closing due to inactivity.