It popped up on a number of occasions under the heading "missing RAW files" or similar, the latest post with additional links here:
Sporadic RAW images.
Reiterating, the problem is this: if RAW is enabled, flash disabled, and shots taken by briefly (!) clicking the shutter all the way in, then raw files are occasionally missing. It seems that it occurs in many diverse cams, with all known builds.
It is indeed a bug, a deeply rooted one, and such that concerns the basic CHDK functionality. Intolerable, that is.
The origin of the bug is that using that somewhat uncommon shooting practice leads to occasionally bypassing the common course of capture sequence events, including our raw hook. Good news is that apparently it is only in one more place that additional hook needs to be added. Bad news is that it is platform-dependent. Anyway, here's an example:
void __attribute__((naked,noinline)) capt_seq_task()
{
asm volatile (
" STMFD SP!, {R4,LR}\n"
" SUB SP, SP, #4\n"
" MOV R4, SP\n"
" B loc_FFB0DEB4\n"
...
"loc_FFB0DD98:\n"
" BL sub_FFB0E3BC\n"
"BL shooting_expo_param_override\n" // + <-----------------
" BL sub_FFB0BA04\n"
" LDR R3, =0xAAB80\n"
" LDR R2, [R3,#0x24]\n"
" CMP R2, #0\n"
" BEQ loc_FFB0DE98\n"
" BL sub_FFB0D8E4\n" //<---------- need additional RAW hook in here, too!
" B loc_FFB0DE98\n"
"loc_FFB0DDB8:\n"
//" BL sub_FFB0D80C\n"
" BL sub_FFB0D80C_my\n" //<--------- usual RAW hook inside
"loc_FFB0DDBC:\n"
" LDR R2, =0xAAB80\n"
" MOV R3, #0\n"
.....