WorkspacePool triggers uncatchable error when auto_scheduling gives an illegal schedule

I am using multi-threading in C++ to try auto_schedule. The auto_scheduler will sometimes give wrong schedule and cause the execution of the packed function from build to fail. This failure will further cause an error when WorkspacePool is deconstructed in the following code snap:

   void Release(TVMContext ctx, DeviceAPI* device) {
    CHECK_EQ(allocated_.size(), 1);

    for (size_t i = 1; i < free_list_.size(); ++i) {
      device->FreeDataSpace(ctx, free_list_[i].data);
    }
    free_list_.clear();
  }

The CHECK_EQ will trigger abort() and cause the whole auto_scheduler process to crash. Is there anyway to clean up the WorkspacePool when an invalid schedule is explored?