Compare commits

..

6 Commits

Author SHA1 Message Date
fluencebot
ce194e3fd3
chore(master): release sqlite-wasm 0.18.2 (#25) 2023-12-25 16:26:26 +03:00
Valery Antopol
13a62f2b10
fix: fix use-after-free when using sqlite_bind_text/sqlite_bind_blob with sqlite_step (#24) 2023-12-25 07:01:37 +03:00
Anatolios Laskaris
d1905792d4
chore: Update nox e2e step (#23)
Update nox e2e step
2023-11-21 13:56:37 +02:00
Anatolios Laskaris
94366b95ae
chore: Use new setup rust action and fix e2e (#22)
* Use new setup rust action

* Fix e2e

* Add rust-toolchain file

* Fix
2023-11-13 18:25:20 +02:00
Anatolios Laskaris
0feed3f180
chore: Setup marine artifact from checks (#21)
* Test updated setup-marine

* Use release version
2023-09-04 14:56:54 +03:00
Anatolios Laskaris
f0d4881845
chore: Fix dockerfile and e2e label mechanics (#20) 2023-04-11 14:20:58 +03:00
9 changed files with 67 additions and 40 deletions

View File

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

View File

@ -27,23 +27,12 @@ jobs:
mv wasi-sdk-* wasi-sdk mv wasi-sdk-* wasi-sdk
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1 uses: dsherret/rust-toolchain-file@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,6 +30,9 @@ 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 }}
@ -53,11 +56,26 @@ jobs:
} }
] ]
rust-peer: decider:
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"
}
]
uses: fluencelabs/rust-peer/.github/workflows/build.yml@master nox:
needs:
- spell
- decider
uses: fluencelabs/nox/.github/workflows/build.yml@master
with: with:
cargo-dependencies: | cargo-dependencies: |
[ [
@ -70,35 +88,39 @@ 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"
} }
] ]
rust-peer-snapshot: nox-snapshot:
name: "rust-peer" name: "nox"
needs: needs:
- rust-peer - nox
uses: fluencelabs/rust-peer/.github/workflows/container.yml@master uses: fluencelabs/nox/.github/workflows/container.yml@master
with: with:
image-name: "docker.fluence.dev/sqlite-wasm-connector" image-name: "docker.fluence.dev/sqlite"
flavour: "minimal"
rust-peer-sha: "${{ needs.rust-peer.outputs.rust-peer-sha }}"
spell-aqua-tests: spell-aqua-tests:
name: "spell" name: "spell"
needs: needs:
- rust-peer-snapshot - nox-snapshot
uses: fluencelabs/spell/.github/workflows/tests.yml@main uses: fluencelabs/spell/.github/workflows/tests.yml@main
with: with:
rust-peer-image: "${{ needs.rust-peer-snapshot.outputs.rust-peer-image }}" nox-image: "${{ needs.nox-snapshot.outputs.nox-image }}"
registry: registry:
needs: needs:
- snapshot - snapshot
- rust-peer-snapshot - nox-snapshot
uses: fluencelabs/registry/.github/workflows/tests.yml@main uses: fluencelabs/registry/.github/workflows/tests.yml@main
with: with:
rust-peer-image: "${{ needs.rust-peer-snapshot.outputs.rust-peer-image }}" nox-image: "${{ needs.nox-snapshot.outputs.nox-image }}"
cargo-dependencies: | cargo-dependencies: |
[ [
{ {

View File

@ -1,5 +1,12 @@
# 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,10 +7,9 @@ RUN apt update \
git \ git \
make \ make \
pkg-config \ pkg-config \
libtinfo6 \ libtinfo6
cargo
RUN cargo install marine --version 0.12.7 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
VOLUME /code VOLUME /code
WORKDIR /code WORKDIR /code

View File

@ -1,4 +1,5 @@
export PATH="${PATH}:/root/.cargo/bin" export PATH="${PATH}:/root/.cargo/bin:/root/.local/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 .
mv wasi-sdk-* wasi-sdk rm -rf wasi-sdk
mv -f wasi-sdk-* wasi-sdk
make make

9
rust-toolchain.toml Normal file
View File

@ -0,0 +1,9 @@
[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 if it is not SQLITE_STATIC // xDel is a custom deallocator and due to our IT architecture it can't be provided from other modules.
// 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, xDel, 0); return bindText(pStmt, i, zData, nData, SQLITE_TRANSIENT, 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 if it is not SQLITE_STATIC // xDel is a custom deallocator and due to our IT architecture it can't be provided from other modules.
// 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, xDel, SQLITE_UTF8); return bindText(pStmt, i, zData, nData, SQLITE_TRANSIENT, SQLITE_UTF8);
} }
#endif #endif

View File

@ -1 +1 @@
0.18.1 0.18.2