BugChecker icon indicating copy to clipboard operation
BugChecker copied to clipboard

BcRelease is empty

Open zwclose opened this issue 2 years ago • 5 comments

Hey,

The output directory is empty, no executables there. Did you plan publish them?

Also, I have a question related to floating point operations in QuickJS. Floating point operations require some special handling in kernel mode and I didn't find anything like that in the project. Did I miss something or you just don't trigger FP code paths?

Thanks!

zwclose avatar Jun 19 '23 20:06 zwclose

Ah, "Before calling QuickJS, BugChecker saves the FPU state (on x86) and switches to an expanded stack of 128KB." -- this solves the mystery of FPU. Yet it would be nice to have drivers compiled :)

zwclose avatar Jun 19 '23 23:06 zwclose

hi,

if you are interested in how BugChecker handles the FPU state in kernel mode, search for the "SaveFPUState" class in the project.

The pre-built binaries of BC are available here: https://github.com/vitoplantamura/BugChecker/releases

If you want to compile the driver yourself, please follow the instructions in the "Build Instructions" section of the main README.md file.

--Vito

vitoplantamura avatar Jun 20 '23 05:06 vitoplantamura

Hi,

Thanks for the answers. I have a one more question if you don't mind.

How did you link a few CRT functions like floor, ceil and those that use FILE operations to BugChecker.sys? I edit the project to make it compilable from Visual Studio to get rid of old DDK requirement and it seems to be the last obstacle that I have. By the way, I can PR it once make sure it works.

zwclose avatar Jun 21 '23 14:06 zwclose

hi,

all the projects (including the main sys driver) compile and link correctly if you follow precisely the instructions in the main README.md.

If you are curious about how some CRT functions (like the ones you mention) are made available to QuickJS, take a look at the "QuickJSDeclFill.h" file. Essentially all the calls are intercepted through a series of #define; for example "fabs" is replaced with "_bc_fabs" in the QuickJS code. Then BugChecker defines the "_bc_fabs" function.

Some (essential -i.e. "essential" for the functioning of QuickJS-) functions are reimplemented (like "_bc_fabs") while some other (non-essential) functions call the "NOT_IMPLEMENTED" function defined by BugChecker, which records all the not implemented function calls and displays them to the user in the BugChecker UI (for debug purposes). Search for these function names in the source code to get a better understanding of how the whole thing works.

--Vito

On Wed, Jun 21, 2023, 16:52 zwclose @.***> wrote:

Hi,

Thanks for the answers. I have a one more question if you don't mind.

How did you link a few CRT functions like floor, ceil and those that use FILE operations to BugChecker.sys? I edit the project to make it compilable from Visual Studio to get rid of old DDK requirement and it seems to be the last obstacle that I have. By the way, I can PR it once make sure it works.

— Reply to this email directly, view it on GitHub https://github.com/vitoplantamura/BugChecker/issues/5#issuecomment-1600988773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2JIRENODWM5JXFQMFS6CDXMMDELANCNFSM6AAAAAAZMLUZZY . You are receiving this because you commented.Message ID: @.***>

vitoplantamura avatar Jun 21 '23 17:06 vitoplantamura

Cool, got it!

zwclose avatar Jun 22 '23 21:06 zwclose