Compare commits

..

No commits in common. "master" and "sqlite-wasm-v0.18.1" have entirely different histories.

9 changed files with 40 additions and 67 deletions

View File

@ -1,3 +1,3 @@
{ {
".": "0.18.2" ".": "0.18.1"
} }

View File

@ -27,12 +27,23 @@ jobs:
mv wasi-sdk-* wasi-sdk mv wasi-sdk-* wasi-sdk
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: dsherret/rust-toolchain-file@v1 uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Download marine artifact
id: marine
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: marine
path: ~/.local/bin
- name: Make marine executable
if: steps.marine.outcome == 'success'
run: chmod +x ~/.local/bin/marine
- name: Setup marine - name: Setup marine
if: steps.marine.outcome == 'failure'
uses: fluencelabs/setup-marine@v1 uses: fluencelabs/setup-marine@v1
with:
artifact-name: "marine"
- name: Build sqlite-wasm - name: Build sqlite-wasm
run: make run: make

View File

@ -30,9 +30,6 @@ concurrency:
jobs: jobs:
build: build:
name: "sqlite" name: "sqlite"
if: >
github.event_name == 'push' ||
contains(github.event.pull_request.labels.*.name, 'e2e')
uses: ./.github/workflows/build.yml uses: ./.github/workflows/build.yml
with: with:
ref: ${{ github.ref }} ref: ${{ github.ref }}
@ -56,26 +53,11 @@ jobs:
} }
] ]
decider: rust-peer:
needs: needs:
- spell - spell
uses: fluencelabs/decider/.github/workflows/snapshot.yml@main
with:
cargo-dependencies: |
[
{
"package": "fluence-spell-dtos",
"version": "=${{ needs.spell.outputs.cargo-version }}",
"registry": "fluence"
}
]
nox: uses: fluencelabs/rust-peer/.github/workflows/build.yml@master
needs:
- spell
- decider
uses: fluencelabs/nox/.github/workflows/build.yml@master
with: with:
cargo-dependencies: | cargo-dependencies: |
[ [
@ -88,39 +70,35 @@ jobs:
"package": "fluence-spell-distro", "package": "fluence-spell-distro",
"version": "=${{ needs.spell.outputs.cargo-version }}", "version": "=${{ needs.spell.outputs.cargo-version }}",
"registry": "fluence" "registry": "fluence"
},
{
"package": "decider-distro",
"version": "=${{ needs.decider.outputs.cargo-version }}",
"manifest": "crates/system-services/Cargo.toml",
"registry": "fluence"
} }
] ]
nox-snapshot: rust-peer-snapshot:
name: "nox" name: "rust-peer"
needs: needs:
- nox - rust-peer
uses: fluencelabs/nox/.github/workflows/container.yml@master uses: fluencelabs/rust-peer/.github/workflows/container.yml@master
with: with:
image-name: "docker.fluence.dev/sqlite" image-name: "docker.fluence.dev/sqlite-wasm-connector"
flavour: "minimal"
rust-peer-sha: "${{ needs.rust-peer.outputs.rust-peer-sha }}"
spell-aqua-tests: spell-aqua-tests:
name: "spell" name: "spell"
needs: needs:
- nox-snapshot - rust-peer-snapshot
uses: fluencelabs/spell/.github/workflows/tests.yml@main uses: fluencelabs/spell/.github/workflows/tests.yml@main
with: with:
nox-image: "${{ needs.nox-snapshot.outputs.nox-image }}" rust-peer-image: "${{ needs.rust-peer-snapshot.outputs.rust-peer-image }}"
registry: registry:
needs: needs:
- snapshot - snapshot
- nox-snapshot - rust-peer-snapshot
uses: fluencelabs/registry/.github/workflows/tests.yml@main uses: fluencelabs/registry/.github/workflows/tests.yml@main
with: with:
nox-image: "${{ needs.nox-snapshot.outputs.nox-image }}" rust-peer-image: "${{ needs.rust-peer-snapshot.outputs.rust-peer-image }}"
cargo-dependencies: | cargo-dependencies: |
[ [
{ {

View File

@ -1,12 +1,5 @@
# Changelog # Changelog
## [0.18.2](https://github.com/fluencelabs/sqlite/compare/sqlite-wasm-v0.18.1...sqlite-wasm-v0.18.2) (2023-12-25)
### Bug Fixes
* fix use-after-free when using sqlite_bind_text/sqlite_bind_blob with sqlite_step ([#24](https://github.com/fluencelabs/sqlite/issues/24)) ([13a62f2](https://github.com/fluencelabs/sqlite/commit/13a62f2b1017e2e5e860951bf01516c0aea739a0))
## [0.18.1](https://github.com/fluencelabs/sqlite/compare/sqlite-wasm-v0.18.0...sqlite-wasm-v0.18.1) (2023-04-06) ## [0.18.1](https://github.com/fluencelabs/sqlite/compare/sqlite-wasm-v0.18.0...sqlite-wasm-v0.18.1) (2023-04-06)

View File

@ -7,9 +7,10 @@ RUN apt update \
git \ git \
make \ make \
pkg-config \ pkg-config \
libtinfo6 libtinfo6 \
cargo
RUN mkdir -p ~/.local/bin && curl -L https://github.com/fluencelabs/marine/releases/download/marine-v0.14.1/marine-linux-x86_64 -o ~/.local/bin/marine && chmod +x ~/.local/bin/marine RUN cargo install marine --version 0.12.7
VOLUME /code VOLUME /code
WORKDIR /code WORKDIR /code

View File

@ -1,5 +1,4 @@
export PATH="${PATH}:/root/.cargo/bin:/root/.local/bin" export PATH="${PATH}:/root/.cargo/bin"
curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-15/wasi-sdk-15.0-linux.tar.gz | tar xz -C . curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-15/wasi-sdk-15.0-linux.tar.gz | tar xz -C .
rm -rf wasi-sdk mv wasi-sdk-* wasi-sdk
mv -f wasi-sdk-* wasi-sdk
make make

View File

@ -1,9 +0,0 @@
[toolchain]
channel = "nightly-2023-08-27"
components = [
"rustfmt",
"clippy",
]
targets = [
"x86_64-unknown-linux-gnu",
]

View File

@ -1537,11 +1537,11 @@ int sqlite3_bind_blob_(sqlite3_stmt *pStmt, int i, const void *zData, int nData,
return SQLITE_MISUSE_BKPT; return SQLITE_MISUSE_BKPT;
#endif #endif
// xDel is a custom deallocator and due to our IT architecture it can't be provided from other modules. // xDel is a custom deallocator and if it is not SQLITE_STATIC
// due to our IT architecture it can't be provided from other modules.
// However the memory zData uses has to be cleaned up eventually. // However the memory zData uses has to be cleaned up eventually.
// So, it is cleared as intended in IT, and xDel is set to SQLITE_TRANSIENT to make sqlite copy the data.
add_object_to_release((void*)zData); add_object_to_release((void*)zData);
return bindText(pStmt, i, zData, nData, SQLITE_TRANSIENT, 0); return bindText(pStmt, i, zData, nData, xDel, 0);
} }
#endif #endif
@ -1613,11 +1613,11 @@ int sqlite3_bind_text(sqlite3_stmt *pStmt, int i, const char *zData, int nData,
int sqlite3_bind_text_(sqlite3_stmt *pStmt, int i, const char *zData, int nData, int sqlite3_bind_text_(sqlite3_stmt *pStmt, int i, const char *zData, int nData,
void (*xDel)(void *)) void (*xDel)(void *))
__attribute__((export_name("sqlite3_bind_text"))) { __attribute__((export_name("sqlite3_bind_text"))) {
// xDel is a custom deallocator and due to our IT architecture it can't be provided from other modules. // xDel is a custom deallocator and if it is not SQLITE_STATIC
// due to our IT architecture it can't be provided from other modules.
// However the memory zData uses has to be cleaned up eventually. // However the memory zData uses has to be cleaned up eventually.
// So, it is cleared as intended in IT, and xDel is set to SQLITE_TRANSIENT to make sqlite copy the data.
add_object_to_release((void*)zData); add_object_to_release((void*)zData);
return bindText(pStmt, i, zData, nData, SQLITE_TRANSIENT, SQLITE_UTF8); return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
} }
#endif #endif

View File

@ -1 +1 @@
0.18.2 0.18.1