fix: 一处越界问题

This commit is contained in:
msojocs 2025-01-22 11:20:47 +08:00
parent ba7b8b2477
commit 4b8eabe60b
7 changed files with 1807 additions and 25 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ node_modules
*err.js
*stderr.json
.cache
*/spec/**/*output.js
*/spec/**/*output.js
tmp

1812
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ namespace WXSS
/* data */
public:
using STATE = int;
static int TT[26113];
static int TT[26114];
static bool bInited;
std::string offset_0; // 文件内容
std::string offset_24; // 文件路径

View File

@ -21,7 +21,7 @@ namespace WXSS
}
const char *DIRECTIVES[] = {"@import", "@charset", "@media", "@keyframes", "@-webkit-keyframes", "@supports", "nth-child", "nth-last-child", "nth-of-type", "nth-last-of-type"};
int Tokenizer::TT[26113] = {0};
int Tokenizer::TT[26114] = {0};
bool Tokenizer::bInited = false;
void Tokenizer::InitTransitTable(/* args */)
{

View File

@ -28,7 +28,7 @@ describe("wcc - empty", function () {
fs.writeFileSync(`${storagePath}/wine-output.js`, w);
fs.writeFileSync(`${storagePath}/node-output.js`, n);
assert.equal(w, n);
assert.equal(n, w, `wine: ${w}\n\nlinux: ${n}`);
});
});
});

9
tools/gcc-540.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
wget https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.gz
sudo mkdir /usr/local/gcc
tar -zxf gcc-5.4.0.tar.gz
cd gcc-5.4.0
./contrib/download_prerequisites
./configure --prefix=/usr/local/gcc/gcc-5.4.0 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --disable-libsanitizer
make
sudo make install

View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo apt-get install -y libxdamage1 libxcomposite-dev libxkbcommon-x11-0 libcups2 libnss3-dev libxrandr2 libgbm-dev libpangocairo-1.0-0 libasound2 libatspi2.0-0