17 Commits
Author SHA1 Message Date
M09Ic 2b8ab24a20 ci: clean dist before release 2026-06-23 22:43:45 +08:00
M09Ic 58d4343998 fix: restore ci release builds 2026-06-23 22:39:23 +08:00
M09IcandClaude Opus 4.6 f4b8adf642 ci: upgrade Go version to 1.25 for goreleaser workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-26 07:16:23 -07:00
M09IcandClaude Opus 4.6 c73a77408f fix: eliminate monitor goroutine race and simplify concurrency
Root cause: the atomic.Bool + polling monitor goroutine pattern had a
race between wg.Wait() in the monitor and wg.Add(1) in the main loop.
When the monitor observed done=true and started Wait, the main loop
could still dispatch new work, causing Close().wg.Wait() to hang.

Fix: replace with nil-channel + sync.Once pattern. When the word stream
exhausts or limit is hit, worderCh is set to nil (disabling that select
branch permanently), then a single goroutine waits for wg to reach zero.
Since wg.Add(1) only occurs in the worderCh branch, nil-ing it before
Wait guarantees no new Add after Wait starts — no race possible.

Other fixes:
- Task feeder goroutine now ctx-aware (prevents leak on cancel)
- AddPool checks Invoke error (prevents poolwg counter mismatch)
- Revert resource_provider IIFE (reading a struct field cannot panic)
- Remove E2E -short skip (race is fixed, full coverage in CI)
- Fix Go 1.24+ vet: non-constant format strings in Init()

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-19 12:22:58 -07:00
M09IcandClaude Opus 4.6 11c90dc313 fix: resolve deadlock/panic risks and add comprehensive test coverage
Bug fixes:
- Defer scopeLocker.Unlock in doScopeCrawl (deadlock on panic)
- Defer statsMu.Unlock in recordStat (deadlock on panic)
- Defer RUnlock in resource_provider.LoadConfig via inline func
- Fix data race in invoke(): move bl field writes before doRedirect
- Close response body on ReadAll error (connection leak)
- Add defer raw.Close() for raw file parsing (fd leak)
- Safe type assertion in load.go keyword parsing (panic on bad YAML)
- Check ants pool creation errors in NewBrutePool/NewCheckPool

New tests (15 test functions):
- pool_test.go: scopeLocker panic recovery, cancel mid-processing,
  single-threaded map access, valid pool creation
- runner_test.go: concurrent recordStat safety, nil stat handling
- load_test.go: malformed YAML tolerance, valid YAML loading
- e2e_test.go: normal brute scan, context cancellation, server errors,
  WAF behavior, multi-target check mode, mixed status codes

CI hardening:
- Add -race detector (Linux, -short mode)
- Add -timeout 300s to prevent deadlock hangs

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-19 11:36:42 -07:00
M09IcandClaude Opus 4.6 0a6132ca02 chore: normalize line endings (CRLF → LF)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-05-08 10:12:56 -07:00
M09IcandClaude Opus 4.6 5179d7a33c ci: add pool shutdown regression tests and PR CI workflow
Add 19 tests in core/pool/pool_test.go covering:
- addAddition: normal, after cancel, wg balance, full buffer, concurrent
- sendProcess: normal, after cancel, full buffer, concurrent
- putToOutput/putToFuzzy: normal, after cancel, Outwg balance
- Handler lifecycle: processCh close exits handler, drains all items
- Shutdown sequence: no deadlock, cancel mid-flight
- Goroutine leak detection after full shutdown

Add .github/workflows/ci.yml:
- Runs on PR to master and push to master
- Tests on ubuntu-latest and windows-latest
- go build, go test -race, go vet

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-06 23:39:22 +08:00
M09Ic 096276fdb5 fix: cicd releaser 2025-06-05 13:59:13 +08:00
M09Ic 8d1e22142f ci: fix golang version go1.20 2025-02-22 21:05:39 +08:00
M09Ic fa9f681bff ci: fix golang version go1.20 2025-02-22 21:01:00 +08:00
M09Ic 4f7707a22e ci: update gorelease go version to 1.20 2025-02-22 14:41:37 +08:00
M09Ic 79198d5bfd adapt goreleaser2.0 2024-06-23 16:47:11 +08:00
M09Ic 1d3e1c1c22 update go version to 1.21 2024-02-12 16:55:16 +08:00
M09Ic 5d7b91e656 enable upx release 2024-02-07 01:55:42 +08:00
M09Ic 4280eb8593 fix gorelease.yml 2023-06-06 20:27:16 +08:00
M09Ic 243bb06c21 删除action中的upx相关部分 2023-05-04 13:08:10 +08:00
M09Ic 8aee640332 添加自动化编译 2023-05-04 12:23:24 +08:00