[sane-devel] [sane-pixma] Canon MF4150 v. PIXMA_CAP_LINEART

Samuel Adam adam at certifound.com
Wed Aug 28 06:55:17 UTC 2013

On Tue, 27 Aug 2013 13:11:40 -0400, Samuel Adam <adam at certifound.com> 

> I applied your patch against git version af107912.  It segfaults
> without producing any noticeable activity in the scanner; and the
> segfault occurs whether --mode is set to "Lineart", "Gray", or
> "Color".  I find this baffling, as on a brief glance the new lineart
> code path *seems* to be largely branched over in other modes (at 
> least
> in the logical beginning thereof).
> Compiling without the patch, git af107912 seeks to work (with some
> flakiness).

Skimming the code, I am about 80% certain that:

(1) It is dying between these two points in the codepath:

	(a) pixma_imageclass.c: iclass_check_param()
	(b) pixma.c: start_reader_task()

(Viz.:  Successfully completes the former; segfaults at an undetermined 
point before reaching or completing the latter.)

(2) Up to that point, the *only* substantive changes induced by the 
patch are alterations to the values of various data structures.

===> Therefore:  Is there anything which jumps out to those familiar 
with the code between point (a) and point (b) which would or could choke 
upon a change in the size, shape, or contents of pixma_scan_param_t 
structure?  (There is one other blackmagic blob of bit-stuffing changed 
before that.  The change is only effective if the "--mode" is set to 
"Lineart", however; whereas the segfault occurs regardless.)

Yes, I am aware that I may get some "wtf" for not simply attaching a 

Samuel Adam

More information about the sane-devel mailing list