Shaders can't find main

i’m trying to create a graphics pipeline on C. validator says this

vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0].pName `main` entrypoint not found for stage VK_SHADER_STAGE_VERTEX_BIT. The Vulkan spec states: pName must be the name of an OpEntryPoint in module with an execution model that matches stage

and the same for fragment shader, after that i get SIGTRAP. the thing is that i have the function with name “main” in both shaders, but it can’t find it for some reason.
i use this code to read the compiled shader file:

uint32_t getFileContent(char* path, char** pContent) {
    FILE* file = fopen(path, "rb");
    fseek(file, 0, SEEK_END);
    uint32_t fileSize = ftell(file);
    fseek(file, 0, SEEK_SET);

    char* content = malloc(sizeof(char) * (fileSize+1));
    fread(content, fileSize, 1, file);
    fclose(file);

    content[fileSize] = '\0';
    *pContent = content;

    return fileSize;
}

i tested it on regular files with text and didn’t notice any corrupted data in them, the size returned is seems to be fine too.

i have this for creating shader module:

void createShaderModule(VkShaderModule* pShaderModule, char* pSpirv, uint32_t spirvSize) {
    VkShaderModuleCreateInfo shaderModuleInfo = {};
    shaderModuleInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
    shaderModuleInfo.codeSize = spirvSize;
    shaderModuleInfo.pCode = (uint32_t*)pSpirv;

    if (vkCreateShaderModule(device, &shaderModuleInfo, NULL, pShaderModule) != VK_SUCCESS) {
        printf("failed to create shader module\n");
        exit(0);
    }
}

and then i create the pipeline like this

void createGraphicsPipeline(VkPipeline* pPipeline, char* vertPath, char* fragPath) {
    VkShaderModule frag, vert;
    char *vertCode, *fragCode;
    uint32_t vertSize = getFileContent(vertPath, &vertCode);
    uint32_t fragSize = getFileContent(fragPath, &fragCode);
    createShaderModule(&vert, vertCode, vertSize);
    createShaderModule(&frag, fragCode, fragSize);
    free(vertCode);
    free(fragCode);

    VkPipelineShaderStageCreateInfo vertStageInfo = {};
    vertStageInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
    vertStageInfo.stage = VK_SHADER_STAGE_VERTEX_BIT;
    vertStageInfo.module = vert;
    vertStageInfo.pName = "main";

    VkPipelineShaderStageCreateInfo fragStageInfo = {};
    fragStageInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
    fragStageInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
    fragStageInfo.module = frag;
    fragStageInfo.pName = "main";

    VkPipelineShaderStageCreateInfo shaderStages[2] = {vertStageInfo, fragStageInfo};

    ......

    VkGraphicsPipelineCreateInfo pipelineInfo = {};
    pipelineInfo.stageCount = 2;
    pipelineInfo.pStages = shaderStages;
    ......

    vkCreateGraphicsPipelines(device, NULL, 1, &pipelineInfo, NULL, pPipeline);

    .......
}

i tried replacing the shaders with the shaders i knew are working and have main function, but it changed nothing