mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	Work on addressing #1337 - fix valgrind case.
This commit is contained in:
		| @@ -233,8 +233,8 @@ const uint8_t *janet_symbol_gen(void) { | ||||
|     head->length = sizeof(janet_vm.gensym_counter) - 1; | ||||
|     head->hash = hash; | ||||
|     sym = (uint8_t *)(head->data); | ||||
|     sym[head->length] = 0; | ||||
|     memcpy(sym, janet_vm.gensym_counter, sizeof(janet_vm.gensym_counter)); | ||||
|     sym[head->length] = 0; | ||||
|     janet_symcache_put((const uint8_t *)sym, bucket); | ||||
|     return (const uint8_t *)sym; | ||||
| } | ||||
|   | ||||
| @@ -366,4 +366,10 @@ | ||||
|                (exec-slurp ;run janet "-e" "(print :hi)"))) | ||||
|           "exec-slurp 1")) | ||||
|  | ||||
| # valgrind-able check for #1337 | ||||
| (def superv (ev/chan 10)) | ||||
| (def f (ev/go |(ev/sleep 1e9) nil superv)) | ||||
| (ev/cancel f (gensym)) | ||||
| (ev/take superv) | ||||
|  | ||||
| (end-suite) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose