MCPcopy Create free account
hub / github.com/R-Fuzz/symsan / RecordMemcmp

Function RecordMemcmp

python/symsan-py.cpp:483–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483static PyObject* RecordMemcmp(PyObject *self, PyObject *args) {
484 if (__z3_parser == nullptr) {
485 PyErr_SetString(PyExc_RuntimeError, "parser not initialized");
486 return NULL;
487 }
488
489 dfsan_label label = 0;
490 PyObject *buf = NULL;
491
492 if (!PyArg_ParseTuple(args, "IS", &label, &buf)) {
493 return NULL;
494 }
495
496 Py_ssize_t size;
497 char *data;
498 if (PyBytes_AsStringAndSize(buf, &data, &size) != 0) {
499 // exception should have been set?
500 return NULL;
501 }
502
503 if (__z3_parser->record_memcmp(label, (uint8_t*)data, size) != 0) {
504 PyErr_SetString(PyExc_RuntimeError, "failed to record memcmp");
505 return NULL;
506 }
507
508 Py_RETURN_NONE;
509}
510
511static PyObject* RecordMinimize(PyObject *self, PyObject *args) {
512 if (__z3_parser == nullptr) {

Callers

nothing calls this directly

Calls 1

record_memcmpMethod · 0.80

Tested by

no test coverage detected